2013-09-27 14:05:45 +00:00
|
|
|
# 20130904 - build of fgcom standalone - geoff
|
|
|
|
# set data installed location
|
2013-09-27 17:07:19 +00:00
|
|
|
set(PKGDATAPATH "${CMAKE_INSTALL_PREFIX}/share/flightgear")
|
2013-09-27 14:05:45 +00:00
|
|
|
|
|
|
|
# then to define the files themselves, in their 'installed'
|
|
|
|
# location, not their source location...
|
|
|
|
if (NOT DEFAULT_POSITIONS_FILE)
|
2013-09-28 20:44:55 +00:00
|
|
|
set(DEFAULT_POSITIONS_FILE "../share/flightgear/positions.txt")
|
2013-09-27 14:05:45 +00:00
|
|
|
endif ()
|
|
|
|
if (NOT SPECIAL_FREQUENCIES_FILE)
|
2013-09-28 20:44:55 +00:00
|
|
|
set(SPECIAL_FREQUENCIES_FILE "../share/flightgear/special_frequencies.txt")
|
2013-09-27 14:05:45 +00:00
|
|
|
endif ()
|
|
|
|
# pass these to the compiler
|
|
|
|
add_definitions( -DDEFAULT_POSITIONS_FILE="${DEFAULT_POSITIONS_FILE}" )
|
|
|
|
add_definitions( -DSPECIAL_FREQUENCIES_FILE="${SPECIAL_FREQUENCIES_FILE}" )
|
|
|
|
|
|
|
|
# Project fgcom, type Console Application
|
|
|
|
set(name fgcom)
|
|
|
|
set( ${name}_SOURCES fgcom.cxx fgcom_init.cxx position.cxx utils.cxx )
|
|
|
|
set( ${name}_HEADERS fgcom.hxx fgcom_init.hxx position.hxx utils.hxx )
|
|
|
|
if(WIN32)
|
|
|
|
list(APPEND ${name}_SOURCES fgcom_getopt.c)
|
|
|
|
list(APPEND ${name}_HEADERS fgcom_getopt.h)
|
|
|
|
endif()
|
|
|
|
add_executable( ${name} ${${name}_SOURCES} ${${name}_HEADERS} )
|
|
|
|
if(WIN32)
|
|
|
|
set_target_properties( ${name} PROPERTIES DEBUG_POSTFIX d )
|
|
|
|
endif()
|
|
|
|
target_link_libraries( ${name} iaxclient_lib )
|
|
|
|
# this could be just on a target basis, but for now
|
2013-09-27 17:07:19 +00:00
|
|
|
include_directories( ${CMAKE_SOURCE_DIR}/3rdparty/iaxclient/lib ) # for iaxclient.h
|
2013-09-27 14:05:45 +00:00
|
|
|
# Now include simgear libraries
|
|
|
|
target_link_Libraries( ${name}
|
|
|
|
${OPENAL_LIBRARY}
|
|
|
|
${SIMGEAR_CORE_LIBRARIES}
|
|
|
|
${SIMGEAR_CORE_LIBRARY_DEPENDENCIES} )
|
|
|
|
# deal with install
|
|
|
|
install(TARGETS ${name} RUNTIME DESTINATION bin)
|
|
|
|
# then install, from their source to install destination
|
|
|
|
set( inst_FILES utils/positions.txt
|
|
|
|
utils/special_frequencies.txt )
|
2013-09-27 17:07:19 +00:00
|
|
|
install(FILES ${inst_FILES} DESTINATION ${PKGDATAPATH})
|
2013-09-27 14:05:45 +00:00
|
|
|
# eof
|