@@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.23)
22
33project (ystdlib VERSION "0.0.1" LANGUAGES CXX)
44
5- list (APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR} /CMake " )
5+ list (APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR} /cmake " )
66include (ystdlib-helpers)
77include (CMakePackageConfigHelpers)
88include (GNUInstallDirs)
@@ -31,14 +31,27 @@ if("${CMAKE_CXX_COMPILER_VERSION}" VERSION_LESS "${ystdlib_CMAKE_CXX_COMPILER_MI
3131 )
3232endif ()
3333
34- # Enable exporting compile commands
3534set (CMAKE_EXPORT_COMPILE_COMMANDS
3635 ON
3736 CACHE BOOL
3837 "Enable/Disable output of compile commands during generation."
3938 FORCE
4039)
4140
41+ set (YSTDLIB_LIBRARIES
42+ "containers"
43+ "error_handling"
44+ "io_interface"
45+ "wrapped_facade_headers"
46+ CACHE STRING
47+ "Semi-colon separated list of libraries to be built."
48+ )
49+
50+ message (STATUS "Building the following libraries:" )
51+ foreach (lib IN LISTS YSTDLIB_LIBRARIES)
52+ message (" - ${lib} " )
53+ endforeach ()
54+
4255if (ystdlib_IS_TOP_LEVEL)
4356 # Include dependency settings if the project isn't being included as a subproject.
4457 # NOTE: We mark the file optional because if the user happens to have the dependencies
@@ -53,17 +66,6 @@ if(BUILD_TESTING AND ystdlib_BUILD_TESTING)
5366 set (ystdlib_ENABLE_TESTS ON )
5467endif ()
5568
56- set (boost_find_package_args
57- 1.81.0
58- REQUIRED
59- COMPONENTS
60- headers
61- )
62- find_package (Boost ${boost_find_package_args} )
63- if (Boost_FOUND)
64- message (STATUS "Found Boost ${Boost_VERSION} ." )
65- endif ()
66-
6769if (ystdlib_ENABLE_TESTS)
6870 find_package (Catch2 3.8.0 REQUIRED)
6971 if (Catch2_FOUND)
@@ -73,7 +75,6 @@ if(ystdlib_ENABLE_TESTS)
7375 endif ()
7476 include (Catch)
7577
76- # Set up the unified unit test target
7778 set (UNIFIED_UNIT_TEST_TARGET "unit-test-all" )
7879 add_executable (${UNIFIED_UNIT_TEST_TARGET} )
7980 target_link_libraries (${UNIFIED_UNIT_TEST_TARGET} PRIVATE Catch2::Catch2WithMain)
@@ -88,13 +89,12 @@ if(ystdlib_ENABLE_TESTS)
8889 catch_discover_tests(${UNIFIED_UNIT_TEST_TARGET} WORKING_DIRECTORY ${CMAKE_BINARY_DIR} /testbin)
8990endif ()
9091
91- add_subdirectory (src/ystdlib)
92-
9392set (ystdlib_INSTALL_CONFIG_DIR ${CMAKE_INSTALL_LIBDIR} /cmake/ystdlib)
94- install (EXPORT ystdlib-targets NAMESPACE ystdlib:: DESTINATION ${ystdlib_INSTALL_CONFIG_DIR} )
93+
94+ add_subdirectory (src/ystdlib)
9595
9696configure_package_config_file(
97- ${CMAKE_CURRENT_LIST_DIR} /CMake /ystdlib-config.cmake.in
97+ ${CMAKE_CURRENT_LIST_DIR} /cmake /ystdlib-config.cmake.in
9898 ${CMAKE_CURRENT_BINARY_DIR} /ystdlib-config.cmake
9999 INSTALL_DESTINATION ${ystdlib_INSTALL_CONFIG_DIR}
100100)
0 commit comments