Add CFGDIR as CMake variable (#1554)

* Add CFGDIR as CMake variable

Adds CFGDIR as a CMake variable.
Previously CFGDIR was hardcoded.

* Add CFGDIR as CMake variable 

Adds CFGDIR as a CMake variable.
Previously CFGDIR was hardcoded.
This commit is contained in:
nafsub 2019-01-01 21:48:07 +00:00 committed by Daniel Marjamäki
parent 19514331fb
commit 56ad760cc5
2 changed files with 4 additions and 1 deletions

View File

@ -5,5 +5,5 @@ if (UNIX)
if (HAVE_RULES)
add_definitions(-DHAVE_RULES -DTIXML_USE_STL)
endif()
add_definitions(-DCFGDIR="${CMAKE_INSTALL_PREFIX}/share/${PROJECT_NAME}")
add_definitions(-DCFGDIR="${CFGDIR}")
endif()

View File

@ -46,3 +46,6 @@ set(CMAKE_LIB_DIRS_CONFIGCMAKE ${CMAKE_INSTALL_PREFIX}/lib CACHE PA
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib)
set(CFGDIR ${CMAKE_INSTALL_PREFIX}/share/${PROJECT_NAME} CACHE STRING "CFG files directory")