CMakeLists.txt 761 B

12345678910111213141516171819202122232425
  1. # This file is part of Desktop App Toolkit,
  2. # a set of libraries for developing nice desktop applications.
  3. #
  4. # For license and copyright information please follow this link:
  5. # https://github.com/desktop-app/legal/blob/master/LEGAL
  6. add_library(external_boost_regex INTERFACE IMPORTED GLOBAL)
  7. add_library(desktop-app::external_boost_regex ALIAS external_boost_regex)
  8. target_compile_definitions(external_boost_regex
  9. INTERFACE
  10. BOOST_NO_INTRINSIC_WCHAR_T
  11. BOOST_REGEX_NO_W32
  12. )
  13. if (DESKTOP_APP_USE_PACKAGED OR LINUX)
  14. find_package(Boost COMPONENTS regex REQUIRED)
  15. target_link_libraries(external_boost_regex INTERFACE Boost::regex)
  16. return()
  17. endif()
  18. target_include_directories(external_boost_regex SYSTEM
  19. INTERFACE
  20. ${libs_loc}/regex/include
  21. )