2018-03-22 18:11:39 +01:00
|
|
|
file(GLOB_RECURSE sources RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.cpp)
|
|
|
|
add_library(app4triqs_c ${sources})
|
|
|
|
|
|
|
|
target_link_libraries(app4triqs_c PUBLIC triqs)
|
|
|
|
target_compile_options(app4triqs_c PUBLIC -std=c++17)
|
2018-03-23 16:59:38 +01:00
|
|
|
target_include_directories(app4triqs_c PUBLIC $<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/c++>)
|
2018-03-22 18:11:39 +01:00
|
|
|
|
2018-03-23 16:59:38 +01:00
|
|
|
target_compile_definitions(app4triqs_c PRIVATE
|
|
|
|
APP4TRIQS_GIT_HASH=${APP4TRIQS_GIT_HASH}
|
|
|
|
TRIQS_GIT_HASH=${TRIQS_GIT_HASH}
|
|
|
|
$<$<CONFIG:Debug>:DEBUG_APP4TRIQS>
|
|
|
|
$<$<CONFIG:Debug>:TRIQS_ARRAYS_ENFORCE_BOUNDCHECK>
|
|
|
|
#$<$<BOOL:${MyOption}>:MYOPTION> # Add compile definintions for option
|
2018-03-22 18:11:39 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
# Install
|
2018-03-23 16:59:38 +01:00
|
|
|
install(TARGETS app4triqs_c EXPORT app4triqs-targets DESTINATION lib)
|
2018-03-22 18:11:39 +01:00
|
|
|
|
|
|
|
# If other applications need our headers, we can install them as well
|
2018-03-23 16:59:38 +01:00
|
|
|
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} DESTINATION include FILES_MATCHING PATTERN "*.hpp" PATTERN "*.h")
|