FGCom standalone: .txt destination can be tweaked with -DFGCOM_DATA_PATH
This commit is contained in:
parent
25bf3793bd
commit
6c683945f0
1 changed files with 20 additions and 11 deletions
|
@ -1,19 +1,28 @@
|
||||||
# 20130904 - build of fgcom standalone - geoff
|
# 20130904 - build of fgcom standalone - geoff
|
||||||
# set data installed location
|
|
||||||
set(PKGDATAPATH "${CMAKE_INSTALL_PREFIX}/share/flightgear")
|
|
||||||
|
|
||||||
if (MSVC)
|
if (MSVC)
|
||||||
set( RESOURCE_FILE fgcom.rc )
|
set( RESOURCE_FILE fgcom.rc )
|
||||||
endif (MSVC)
|
endif (MSVC)
|
||||||
|
|
||||||
# then to define the files themselves, in their 'installed'
|
if (NOT FGCOM_DATA_PATH)
|
||||||
# location, not their source location...
|
# use relative paths (for standalone and custom installation)
|
||||||
if (NOT DEFAULT_POSITIONS_FILE)
|
set(FGCOM_DATA_PATH "${CMAKE_INSTALL_PREFIX}/share/flightgear")
|
||||||
set(DEFAULT_POSITIONS_FILE "../share/flightgear/positions.txt")
|
if (APPLE)
|
||||||
endif ()
|
# on Mac "share" directory doesn't exist
|
||||||
if (NOT SPECIAL_FREQUENCIES_FILE)
|
# .txt files are moved in the Resources directory because of Mac convention
|
||||||
set(SPECIAL_FREQUENCIES_FILE "../share/flightgear/special_frequencies.txt")
|
# This movement is handled by the fgmeta.git/hudson_mac_package_release.rb line 139
|
||||||
endif ()
|
set(DEFAULT_POSITIONS_FILE "../Resources/positions.txt")
|
||||||
|
set(SPECIAL_FREQUENCIES_FILE "../Resources/special_frequencies.txt")
|
||||||
|
else (APPLE)
|
||||||
|
set(DEFAULT_POSITIONS_FILE "../share/flightgear/positions.txt")
|
||||||
|
set(SPECIAL_FREQUENCIES_FILE "../share/flightgear/special_frequencies.txt")
|
||||||
|
endif (APPLE)
|
||||||
|
else()
|
||||||
|
# use absolute paths, useful for package creation (e.g -DFGCOM_DATA_PATH=/usr/share/fgcom)
|
||||||
|
set(DEFAULT_POSITIONS_FILE "${FGCOM_DATA_PATH}/positions.txt")
|
||||||
|
set(SPECIAL_FREQUENCIES_FILE "${FGCOM_DATA_PATH}/special_frequencies.txt")
|
||||||
|
endif()
|
||||||
|
|
||||||
# pass these to the compiler
|
# pass these to the compiler
|
||||||
add_definitions( -DDEFAULT_POSITIONS_FILE="${DEFAULT_POSITIONS_FILE}" )
|
add_definitions( -DDEFAULT_POSITIONS_FILE="${DEFAULT_POSITIONS_FILE}" )
|
||||||
add_definitions( -DSPECIAL_FREQUENCIES_FILE="${SPECIAL_FREQUENCIES_FILE}" )
|
add_definitions( -DSPECIAL_FREQUENCIES_FILE="${SPECIAL_FREQUENCIES_FILE}" )
|
||||||
|
@ -43,5 +52,5 @@
|
||||||
# then install, from their source to install destination
|
# then install, from their source to install destination
|
||||||
set( inst_FILES utils/positions.txt
|
set( inst_FILES utils/positions.txt
|
||||||
utils/special_frequencies.txt )
|
utils/special_frequencies.txt )
|
||||||
install(FILES ${inst_FILES} DESTINATION ${PKGDATAPATH})
|
install(FILES ${inst_FILES} DESTINATION ${FGCOM_DATA_PATH})
|
||||||
# eof
|
# eof
|
||||||
|
|
Loading…
Reference in a new issue