owlps/owlps-aggregator/CMakeLists.txt

37 lines
1.2 KiB
CMake

set(EXTRA_LIBS ${EXTRA_LIBS} pthread confuse)
add_executable(owlps-aggregatord owlps-aggregatord.c)
target_link_libraries(owlps-aggregatord
libowlps.so
${EXTRA_LIBS})
install(
TARGETS owlps-aggregatord
DESTINATION bin)
add_executable(owlps-aggregatord.semistatic EXCLUDE_FROM_ALL
owlps-aggregatord.c)
target_link_libraries(owlps-aggregatord.semistatic
libowlps.a
${EXTRA_LIBS})
# Add the semistatic target to the global list of semistatic targets
list(APPEND OWLPS_SEMISTATIC_TARGETS owlps-aggregatord.semistatic)
set(OWLPS_SEMISTATIC_TARGETS ${OWLPS_SEMISTATIC_TARGETS} PARENT_SCOPE)
add_executable(owlps-aggregatord.static EXCLUDE_FROM_ALL
owlps-aggregatord.c)
set_target_properties(owlps-aggregatord.static
PROPERTIES LINK_FLAGS -static)
target_link_libraries(owlps-aggregatord.static
libowlps.a
${EXTRA_LIBS})
# Add the static target to the global list of static targets
list(APPEND OWLPS_STATIC_TARGETS owlps-aggregatord.static)
set(OWLPS_STATIC_TARGETS ${OWLPS_STATIC_TARGETS} PARENT_SCOPE)
# Add compile flags for the above targets
set_target_properties(
owlps-aggregatord
owlps-aggregatord.semistatic
owlps-aggregatord.static
PROPERTIES COMPILE_FLAGS ${EXE_FLAGS})