1- cmake_minimum_required ( VERSION 2.8.12 )
1+ cmake_minimum_required ( VERSION 3.10 )
22
33project ( json_to_cpp_prj )
44
55include ( ExternalProject )
66
7- find_package ( Boost 1.58 .0 COMPONENTS system date_time iostreams program_options filesystem regex unit_test_framework REQUIRED )
7+ find_package ( Boost 1.60 .0 COMPONENTS system date_time iostreams program_options filesystem regex unit_test_framework REQUIRED )
88
99find_package ( CURL )
1010find_package ( Threads REQUIRED )
@@ -17,25 +17,21 @@ set( CMAKE_CXX_STANDARD 17 CACHE STRING "The C++ standard whose features are req
1717
1818include ( "${CMAKE_SOURCE_DIR} /dependent_projects/CMakeListsCompiler.txt" )
1919
20- set ( DEP_ROOT_DIR_BASE "${CMAKE_SOURCE_DIR} /dependent_projects/build" )
2120if ( "${CMAKE_BUILD_TYPE} " STREQUAL "Debug" )
22- set ( DEP_ROOT_DIR "${DEP_ROOT_DIR_BASE} /debug" )
2321 set ( GLEAN_CACHE "${CMAKE_SOURCE_DIR} /.glean/debug" )
2422 set ( GLEAN_CACHE2 "${CMAKE_SOURCE_DIR} /.glean/release" )
2523elseif ( "${CMAKE_BUILD_TYPE} " STREQUAL "Release" )
26- set ( DEP_ROOT_DIR "${DEP_ROOT_DIR_BASE} /release" )
2724 set ( GLEAN_CACHE "${CMAKE_SOURCE_DIR} /.glean/release" )
2825 set ( GLEAN_CACHE2 "${CMAKE_SOURCE_DIR} /.glean/debug" )
2926else ( )
30- set ( DEP_ROOT_DIR "${DEP_ROOT_DIR_BASE} /release" )
3127 set ( GLEAN_CACHE "${CMAKE_SOURCE_DIR} /.glean/release" )
3228 set ( GLEAN_CACHE2 "${CMAKE_SOURCE_DIR} /.glean/debug" )
3329endif ( )
3430
3531message ( "Building for: ${CMAKE_BUILD_TYPE} " )
3632message ( "Checking for glean cache: '${GLEAN_CACHE} '" )
3733if ( EXISTS "${GLEAN_CACHE} " )
38- message ( "using glean dependencies" )
34+ message ( "using glean dependencies at ${GLEAN_CACHE} " )
3935 add_custom_target ( dependency_stub )
4036 include_directories ( SYSTEM "${GLEAN_CACHE} /include" )
4137 link_directories ( "${GLEAN_CACHE} /lib" )
@@ -48,17 +44,6 @@ elseif( EXISTS "${CMAKE_SOURCE_DIR}/glean.cmake" )
4844 add_dependencies ( dependency_stub ${DEP_PROJECT_DEPS} )
4945 include_directories ( SYSTEM "${CMAKE_BINARY_DIR} /install/include" )
5046 link_directories ( "${CMAKE_BINARY_DIR} /install/lib" )
51- elseif ( EXISTS "${DEP_ROOT_DIR} " )
52- message ( "${DEP_ROOT_DIR} " )
53- message ( "using dependency folder" )
54- add_custom_target ( dependency_stub )
55- include_directories ( SYSTEM "${DEP_ROOT_DIR} /install/include" )
56- link_directories ( "${DEP_ROOT_DIR} /install/lib" )
57- else ( )
58- message ( "downloading and building deps" )
59- include ( "${CMAKE_SOURCE_DIR} /dependent_projects/dependencies.txt" )
60- add_library ( dependency_stub STATIC "${CMAKE_SOURCE_DIR} /dependent_projects/stub.cpp" )
61- add_dependencies ( dependency_stub ${DEP_PROJECT_DEPS} )
6247endif ( )
6348
6449set ( HEADER_FOLDER "include" )
@@ -101,7 +86,7 @@ set( SOURCE_FILES
10186
10287add_library ( json_to_cpp_lib ${HEADER_FILES} ${SOURCE_FILES} )
10388add_dependencies ( json_to_cpp_lib dependency_stub )
104- target_link_libraries ( json_to_cpp_lib tz utf_range utf_string ${Boost_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} )
89+ target_link_libraries ( json_to_cpp_lib utf_range utf_string ${Boost_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} )
10590
10691add_executable ( json_to_cpp ${HEADER_FILES} ${SOURCE_FOLDER} /main.cpp )
10792add_dependencies ( json_to_cpp dependency_stub )
0 commit comments