1 # 20130904 - build of fgcom standalone - geoff
2 # set data installed location
3 set(PKGDATAPATH "${CMAKE_INSTALL_PREFIX}/share/flightgear")
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")
10 if (NOT SPECIAL_FREQUENCIES_FILE)
11 set(SPECIAL_FREQUENCIES_FILE "../share/flightgear/special_frequencies.txt")
13 # pass these to the compiler
14 add_definitions( -DDEFAULT_POSITIONS_FILE="${DEFAULT_POSITIONS_FILE}" )
15 add_definitions( -DSPECIAL_FREQUENCIES_FILE="${SPECIAL_FREQUENCIES_FILE}" )
17 # Project fgcom, type Console Application
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 )
22 list(APPEND ${name}_SOURCES fgcom_getopt.c)
23 list(APPEND ${name}_HEADERS fgcom_getopt.h)
25 add_executable( ${name} ${${name}_SOURCES} ${${name}_HEADERS} )
27 set_target_properties( ${name} PROPERTIES DEBUG_POSTFIX d )
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}
35 ${SIMGEAR_CORE_LIBRARIES}
36 ${SIMGEAR_CORE_LIBRARY_DEPENDENCIES} )
38 install(TARGETS ${name} RUNTIME DESTINATION bin)
39 # then install, from their source to install destination
40 set( inst_FILES utils/positions.txt
41 utils/special_frequencies.txt )
42 install(FILES ${inst_FILES} DESTINATION ${PKGDATAPATH})