]> git.mxchange.org Git - flightgear.git/blob - utils/fgcom/CMakeLists.txt
FGCom standalone: search *.txt as relative path
[flightgear.git] / utils / fgcom / CMakeLists.txt
1 # 20130904 - build of fgcom standalone - geoff
2     # set data installed location
3     set(PKGDATAPATH "${CMAKE_INSTALL_PREFIX}/share/flightgear")
4
5     # then to define the files themselves, in their 'installed' 
6     # location, not their source location...
7     if (NOT DEFAULT_POSITIONS_FILE)
8       set(DEFAULT_POSITIONS_FILE "../share/flightgear/positions.txt")
9     endif ()
10     if (NOT SPECIAL_FREQUENCIES_FILE)
11       set(SPECIAL_FREQUENCIES_FILE "../share/flightgear/special_frequencies.txt")
12     endif ()
13     # pass these to the compiler
14     add_definitions( -DDEFAULT_POSITIONS_FILE="${DEFAULT_POSITIONS_FILE}" )
15     add_definitions( -DSPECIAL_FREQUENCIES_FILE="${SPECIAL_FREQUENCIES_FILE}" )
16
17     # Project fgcom, type Console Application
18     set(name fgcom)
19     set( ${name}_SOURCES fgcom.cxx fgcom_init.cxx position.cxx utils.cxx )
20     set( ${name}_HEADERS fgcom.hxx fgcom_init.hxx position.hxx utils.hxx )
21     if(WIN32)
22         list(APPEND ${name}_SOURCES fgcom_getopt.c)
23         list(APPEND ${name}_HEADERS fgcom_getopt.h)
24     endif()
25     add_executable( ${name} ${${name}_SOURCES} ${${name}_HEADERS} )
26     if(WIN32)
27         set_target_properties( ${name} PROPERTIES DEBUG_POSTFIX d )
28     endif()
29     target_link_libraries( ${name} iaxclient_lib )
30     # this could be just on a target basis, but for now
31     include_directories( ${CMAKE_SOURCE_DIR}/3rdparty/iaxclient/lib ) # for iaxclient.h
32     # Now include simgear libraries 
33     target_link_Libraries( ${name}
34         ${win_LIBS}
35         ${PLIB_LIBRARIES}
36         ${ZLIB_LIBRARIES}
37         ${OPENAL_LIBRARY}
38         ${SIMGEAR_CORE_LIBRARIES}
39         ${SIMGEAR_CORE_LIBRARY_DEPENDENCIES} )
40     # deal with install
41     install(TARGETS ${name} RUNTIME DESTINATION bin)
42     # then install, from their source to install destination
43     set( inst_FILES utils/positions.txt
44         utils/special_frequencies.txt )
45     install(FILES ${inst_FILES} DESTINATION ${PKGDATAPATH})
46 # eof