owlps/owlps-udp-to-http/CMakeLists.txt

51 lines
1.9 KiB
CMake

# This file is part of the Owl Positioning System (OwlPS) project.
# It is subject to the copyright notice and license terms in the
# COPYRIGHT.t2t file found in the top-level directory of this
# distribution and at
# https://code.lm7.fr/mcy/owlps/src/master/COPYRIGHT.t2t
# No part of the OwlPS Project, including this file, may be copied,
# modified, propagated, or distributed except according to the terms
# contained in the COPYRIGHT.t2t file; the COPYRIGHT.t2t file must be
# distributed along with this file, either separately or by replacing
# this notice by the COPYRIGHT.t2t file's contents.
set(EXTRA_LIBS ${EXTRA_LIBS} ${CMAKE_THREAD_LIBS_INIT})
add_executable(owlps-udp-to-http owlps-udp-to-http.c)
target_link_libraries(owlps-udp-to-http
libowlps.so
libowlps-resultreader.so
${EXTRA_LIBS})
install(
TARGETS owlps-udp-to-http
DESTINATION bin)
add_executable(owlps-udp-to-http.semistatic EXCLUDE_FROM_ALL
owlps-udp-to-http.c)
target_link_libraries(owlps-udp-to-http.semistatic
libowlps.a
libowlps-resultreader.a
${EXTRA_LIBS})
# Add the semistatic target to the global list of semistatic targets
list(APPEND OWLPS_SEMISTATIC_TARGETS owlps-udp-to-http.semistatic)
set(OWLPS_SEMISTATIC_TARGETS ${OWLPS_SEMISTATIC_TARGETS} PARENT_SCOPE)
add_executable(owlps-udp-to-http.static EXCLUDE_FROM_ALL
owlps-udp-to-http.c)
set_target_properties(owlps-udp-to-http.static
PROPERTIES LINK_FLAGS -static)
target_link_libraries(owlps-udp-to-http.static
libowlps.a
libowlps-resultreader.a
${EXTRA_LIBS})
# Add the static target to the global list of static targets
list(APPEND OWLPS_STATIC_TARGETS owlps-udp-to-http.static)
set(OWLPS_STATIC_TARGETS ${OWLPS_STATIC_TARGETS} PARENT_SCOPE)
# Add compile flags for the above targets
set_target_properties(
owlps-udp-to-http
owlps-udp-to-http.semistatic
owlps-udp-to-http.static
PROPERTIES COMPILE_FLAGS ${EXE_FLAGS})