1
0
Fork 0
mirror of https://github.com/gwm17/catima.git synced 2024-11-22 18:28:51 -05:00
catima/bin/CMakeLists.txt

29 lines
851 B
CMake
Raw Normal View History

2018-04-12 19:12:45 -04:00
set(CATIMA_APPS catima_calculator)
2020-11-30 09:39:02 -05:00
find_package(nlohmann_json QUIET)
if(nlohmann_json_FOUND)
MESSAGE(STATUS "system nlohmann_json found ")
else(nlohmann_json_FOUND)
#MESSAGE(STATUS "nlohmann_json looking ")
2019-10-14 11:15:43 -04:00
include(ExternalProject)
ExternalProject_Add(
json_hpp
2020-11-30 09:39:02 -05:00
URL https://github.com/nlohmann/json/releases/download/v3.9.1/include.zip
2019-10-14 11:15:43 -04:00
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND ""
PREFIX "external"
)
2020-11-30 09:39:02 -05:00
ExternalProject_Get_Property(json_hpp SOURCE_DIR)
endif(nlohmann_json_FOUND)
2018-04-12 19:12:45 -04:00
foreach(entry ${CATIMA_APPS})
add_executable(${entry} ${entry}.cpp)
2020-11-30 09:39:02 -05:00
target_link_libraries(${entry} catima )
#target_link_libraries(${entry} PRIVATE nlohmann_json::nlohmann_json)
target_include_directories(${entry} PRIVATE ${SOURCE_DIR}/include)
2018-04-12 19:12:45 -04:00
endforeach(entry in ${CATIMA_APPS})
install (TARGETS ${CATIMA_APPS} RUNTIME DESTINATION bin)