owlps/libowlps-client/CMakeLists.txt

45 lines
1.4 KiB
CMake
Raw Normal View History

# 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
2016-11-03 05:10:34 +01:00
# 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.
# Explicitly link to libc
set(EXTRA_LIBS ${EXTRA_LIBS} c)
# Targets
2013-05-18 19:39:36 +02:00
add_library(libowlps-client.so SHARED libowlps-client.c)
add_library(libowlps-client.a STATIC libowlps-client.c)
# Fix targets' names
2013-05-18 19:39:36 +02:00
set_target_properties(
libowlps-client.so libowlps-client.a
PROPERTIES
OUTPUT_NAME owlps-client
SOVERSION 1
VERSION 1.2
)
# Add compile flags
set_target_properties(libowlps-client.so
PROPERTIES COMPILE_FLAGS ${SHARED_FLAGS})
set_target_properties(libowlps-client.a
PROPERTIES COMPILE_FLAGS ${EXE_FLAGS})
# Link libraries
target_link_libraries(libowlps-client.so libowlps.so ${EXTRA_LIBS})
target_link_libraries(libowlps-client.a libowlps.a ${EXTRA_LIBS})
# Install targets
2013-05-20 03:45:06 +02:00
install(
TARGETS libowlps-client.so libowlps-client.a
DESTINATION lib)
install(
FILES owlps-client.h
DESTINATION include)