diff --git a/CMakeLists.txt b/CMakeLists.txt index d7e190be..a61ba77c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -41,11 +41,10 @@ ##### Current Limitations: # # - Doesn't compile or run tests -# - Doesn't support installation # -cmake_minimum_required( VERSION 3.5 ) -project( BoostRegex LANGUAGES CXX ) +cmake_minimum_required( VERSION 3.5...3.16 ) +project( boost_regex VERSION "${BOOST_SUPERPROJECT_VERSION}" LANGUAGES CXX ) option( BOOST_REGEX_INCLUDE_EXAMPLES "Also build (some) boost regex examples" OFF ) option( BOOST_REGEX_USE_ICU "Enable ICU support in boost regex" OFF ) @@ -55,20 +54,11 @@ file( GLOB BOOST_REGEX_SRC ./src/*.cpp ) add_library( boost_regex ${BOOST_REGEX_SRC} ) add_library( Boost::regex ALIAS boost_regex ) -# Currently, installation isn't supported directly, -# but someone else might install this target from the parent -# CMake script, so lets proactively differentiate between -# the include directory during regular use (BUILD_INTERFACE) -# and after installation -target_include_directories( boost_regex - PUBLIC - $ - $ -) +target_include_directories( boost_regex PUBLIC include ) target_compile_definitions( boost_regex PUBLIC - # No need for autolink and we don't mangle library name anyway + # No need for autolink BOOST_REGEX_NO_LIB $<$,SHARED_LIBRARY>:BOOST_REGEX_DYN_LINK=1> $<$,STATIC_LIBRARY>:BOOST_REGEX_STATIC_LINK=1>