Initial CMake setup
This commit is contained in:
parent
005e5da12e
commit
4467fcd52c
|
@ -0,0 +1,40 @@
|
|||
cmake_minimum_required(VERSION 2.8)
|
||||
|
||||
project(OwlPS)
|
||||
|
||||
|
||||
### Build paths ###
|
||||
|
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
|
||||
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")
|
||||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")
|
||||
|
||||
|
||||
### Libraries ###
|
||||
|
||||
add_subdirectory(libowlps)
|
||||
include_directories(libowlps)
|
||||
|
||||
add_subdirectory(libowlps-client)
|
||||
include_directories(libowlps-client)
|
||||
|
||||
add_subdirectory(libowlps-resultreader)
|
||||
include_directories(libowlps-resultreader)
|
||||
|
||||
|
||||
### Programs ###
|
||||
|
||||
add_subdirectory(owlps-aggregator)
|
||||
|
||||
add_subdirectory(owlps-client)
|
||||
|
||||
if (${CMAKE_SYSTEM_NAME} STREQUAL Linux)
|
||||
add_subdirectory(owlps-listener)
|
||||
else()
|
||||
message(WARNING
|
||||
"OwlPS Listener can be built only for Linux systems")
|
||||
endif()
|
||||
|
||||
#add_subdirectory(owlps-positioner)
|
||||
|
||||
add_subdirectory(owlps-udp-to-http)
|
14
TODO.t2t
14
TODO.t2t
|
@ -55,9 +55,17 @@ Work to do in OwlPS
|
|||
|
||||
- Add option dump-configuration (displays the config & exits).
|
||||
|
||||
- Makefiles:
|
||||
- Use install instead of cp?
|
||||
- autotools, cmake?
|
||||
- CMake:
|
||||
- handle OwlPS version
|
||||
- libraries: version numbers (sonames) and symbolic links
|
||||
- compilation flags
|
||||
- installation targets
|
||||
- static targets
|
||||
- Client: handle ENABLE_RECEIVE_POSITION and link to
|
||||
libowlps-resultreader when activated
|
||||
- Listener: handle options (USE_CONFIG_FILE, USE_PTHREAD,
|
||||
ENABLE_KEEP_MONITOR@
|
||||
- compile Positioner
|
||||
|
||||
- Support string-based positioning requests
|
||||
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
add_library(libowlps-client.a STATIC libowlps-client.c)
|
||||
add_library(libowlps-client.so SHARED libowlps-client.c)
|
||||
set_target_properties(
|
||||
libowlps-client.a libowlps-client.so
|
||||
PROPERTIES OUTPUT_NAME owlps-client)
|
|
@ -0,0 +1,15 @@
|
|||
add_library(libowlps-resultreader.a STATIC libowlps-resultreader.c)
|
||||
add_library(libowlps-resultreader.so SHARED libowlps-resultreader.c)
|
||||
set_target_properties(
|
||||
libowlps-resultreader.a libowlps-resultreader.so
|
||||
PROPERTIES OUTPUT_NAME owlps-resultreader)
|
||||
|
||||
add_executable(owlps-resultreader-udp owlps-resultreader-udp.c)
|
||||
target_link_libraries(owlps-resultreader-udp
|
||||
libowlps.so
|
||||
libowlps-resultreader.so)
|
||||
|
||||
add_executable(owlps-resultreader-udp.semistatic owlps-resultreader-udp.c)
|
||||
target_link_libraries(owlps-resultreader-udp.semistatic
|
||||
libowlps.a
|
||||
libowlps-resultreader.a)
|
|
@ -0,0 +1,5 @@
|
|||
add_library(libowlps.a STATIC libowlps.c)
|
||||
add_library(libowlps.so SHARED libowlps.c)
|
||||
set_target_properties(
|
||||
libowlps.a libowlps.so
|
||||
PROPERTIES OUTPUT_NAME owlps)
|
|
@ -0,0 +1,11 @@
|
|||
set(EXTRA_LIBS ${EXTRA_LIBS} pthread confuse)
|
||||
|
||||
add_executable(owlps-aggregatord owlps-aggregatord.c)
|
||||
target_link_libraries(owlps-aggregatord
|
||||
libowlps.so
|
||||
${EXTRA_LIBS})
|
||||
|
||||
add_executable(owlps-aggregatord.semistatic owlps-aggregatord.c)
|
||||
target_link_libraries(owlps-aggregatord.semistatic
|
||||
libowlps.a
|
||||
${EXTRA_LIBS})
|
|
@ -0,0 +1,10 @@
|
|||
|
||||
add_executable(owlps-client owlps-client.c)
|
||||
target_link_libraries(owlps-client
|
||||
libowlps.so
|
||||
libowlps-client.so)
|
||||
|
||||
add_executable(owlps-client.semistatic owlps-client.c)
|
||||
target_link_libraries(owlps-client.semistatic
|
||||
libowlps.a
|
||||
libowlps-client.a)
|
|
@ -0,0 +1,13 @@
|
|||
set(EXTRA_LIBS ${EXTRA_LIBS} pcap)
|
||||
|
||||
add_executable(owlps-listenerd owlps-listenerd.c)
|
||||
target_link_libraries(owlps-listenerd
|
||||
libowlps.so
|
||||
libowlps-client.so
|
||||
${EXTRA_LIBS})
|
||||
|
||||
add_executable(owlps-listenerd.semistatic owlps-listenerd.c)
|
||||
target_link_libraries(owlps-listenerd.semistatic
|
||||
libowlps.a
|
||||
libowlps-client.a
|
||||
${EXTRA_LIBS})
|
|
@ -0,0 +1,13 @@
|
|||
set(EXTRA_LIBS ${EXTRA_LIBS} pthread)
|
||||
|
||||
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})
|
||||
|
||||
add_executable(owlps-udp-to-http.semistatic owlps-udp-to-http.c)
|
||||
target_link_libraries(owlps-udp-to-http.semistatic
|
||||
libowlps.a
|
||||
libowlps-resultreader.a
|
||||
${EXTRA_LIBS})
|
Loading…
Reference in New Issue