@@ -12,20 +12,43 @@ find_package( Threads REQUIRED )
1212enable_testing ( )
1313add_definitions ( -DBOOST_TEST_DYN_LINK )
1414
15+
16+ set ( CMAKE_CXX_STANDARD 17 CACHE STRING "The C++ standard whose features are requested." )
17+
1518include ( "${CMAKE_SOURCE_DIR} /dependent_projects/CMakeListsCompiler.txt" )
1619
17- include_directories ( "./include" )
1820set ( DEP_ROOT_DIR_BASE "${CMAKE_SOURCE_DIR} /dependent_projects/build" )
1921if ( "${CMAKE_BUILD_TYPE} " STREQUAL "Debug" )
2022 set ( DEP_ROOT_DIR "${DEP_ROOT_DIR_BASE} /debug" )
23+ set ( GLEAN_CACHE "${CMAKE_SOURCE_DIR} /.glean/debug" )
24+ set ( GLEAN_CACHE2 "${CMAKE_SOURCE_DIR} /.glean/release" )
2125elseif ( "${CMAKE_BUILD_TYPE} " STREQUAL "Release" )
2226 set ( DEP_ROOT_DIR "${DEP_ROOT_DIR_BASE} /release" )
23- elseif ( "${CMAKE_BUILD_TYPE} " STREQUAL "" )
27+ set ( GLEAN_CACHE "${CMAKE_SOURCE_DIR} /.glean/release" )
28+ set ( GLEAN_CACHE2 "${CMAKE_SOURCE_DIR} /.glean/debug" )
29+ else ( )
2430 set ( DEP_ROOT_DIR "${DEP_ROOT_DIR_BASE} /release" )
31+ set ( GLEAN_CACHE "${CMAKE_SOURCE_DIR} /.glean/release" )
32+ set ( GLEAN_CACHE2 "${CMAKE_SOURCE_DIR} /.glean/debug" )
2533endif ( )
2634
2735message ( "Building for: ${CMAKE_BUILD_TYPE} " )
28- if ( EXISTS "${DEP_ROOT_DIR} " )
36+ message ( "Checking for glean cache: '${GLEAN_CACHE} '" )
37+ if ( EXISTS "${GLEAN_CACHE} " )
38+ message ( "using glean dependencies" )
39+ add_custom_target ( dependency_stub )
40+ include_directories ( SYSTEM "${GLEAN_CACHE} /include" )
41+ link_directories ( "${GLEAN_CACHE} /lib" )
42+ elseif ( EXISTS "${GLEAN_CACHE2} " )
43+ message ( "looks like glean is in use but missing ${GLEAN_CACHE} " )
44+ elseif ( EXISTS "${CMAKE_SOURCE_DIR} /glean.cmake" )
45+ message ( "glean.cmake detected" )
46+ include ( "${CMAKE_SOURCE_DIR} /glean.cmake" )
47+ add_library ( dependency_stub STATIC "${CMAKE_SOURCE_DIR} /dependent_projects/stub.cpp" )
48+ add_dependencies ( dependency_stub ${DEP_PROJECT_DEPS} )
49+ include_directories ( SYSTEM "${CMAKE_BINARY_DIR} /install/include" )
50+ link_directories ( "${CMAKE_BINARY_DIR} /install/lib" )
51+ elseif ( EXISTS "${DEP_ROOT_DIR} " )
2952 message ( "${DEP_ROOT_DIR} " )
3053 message ( "using dependency folder" )
3154 add_custom_target ( dependency_stub )
0 commit comments