1
0
Fork 0

Add compile-time support for a custom fg-root location, when using CMake

This commit is contained in:
James Turner 2011-11-01 17:05:54 +00:00
parent e819a4aaa4
commit 4b8ef9c3cf
2 changed files with 7 additions and 3 deletions

View file

@ -37,8 +37,12 @@ include (CPack)
# We have some custom .cmake scripts not in the official distribution.
set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/CMakeModules;${CMAKE_MODULE_PATH}")
# autoconf compatibility
set(PKGLIBDIR "foo")
if (FG_DATA_DIR)
message(STATUS "Using explicit data-dir: ${FG_DATA_DIR}")
else()
set(FG_DATA_DIR "${CMAKE_INSTALL_PREFIX}/lib/FlightGear")
message(STATUS "Using default data-dir: ${FG_DATA_DIR}")
endif()
# Change the default build type to something fast
if(NOT CMAKE_BUILD_TYPE)

View file

@ -33,6 +33,6 @@
#cmakedefine HAVE_SVN_CLIENT_H
#cmakedefine HAVE_LIBSVN_CLIENT_1
#define PKGLIBDIR "@PKGLIBDIR"
#define PKGLIBDIR "@FG_DATA_DIR@"
#cmakedefine FG_HAVE_HLA