From 43104cd2e958e60f646a20be801f9c2c280b0205 Mon Sep 17 00:00:00 2001 From: kervala Date: Sat, 8 Dec 2012 13:12:15 +0100 Subject: [PATCH] Fixed: PCH for Georges editor Qt --- .../leveldesign/georges_editor_qt/CMakeLists.txt | 16 ++++++++++++++-- .../georges_editor_qt/geqt_config.h.cmake | 6 ++++++ .../leveldesign/georges_editor_qt/src/main.cpp | 4 ++++ 3 files changed, 24 insertions(+), 2 deletions(-) create mode 100644 code/ryzom/tools/leveldesign/georges_editor_qt/geqt_config.h.cmake diff --git a/code/ryzom/tools/leveldesign/georges_editor_qt/CMakeLists.txt b/code/ryzom/tools/leveldesign/georges_editor_qt/CMakeLists.txt index 3edbb69fb..96dc03d06 100644 --- a/code/ryzom/tools/leveldesign/georges_editor_qt/CMakeLists.txt +++ b/code/ryzom/tools/leveldesign/georges_editor_qt/CMakeLists.txt @@ -6,12 +6,24 @@ #----------------------------------------------------------------------------- # This tells the application(s) where to find the installed data. -ADD_DEFINITIONS(-DDATA_DIR="\\"${RYZOM_SHARE_ABSOLUTE_PREFIX}/georges_editor_qt/\\"") +IF(WIN32) + SET(GEQT_DATA_DIR ".") +ELSEIF(APPLE) + # TODO: under Mac OS X, don't install but copy files in application package + SET(GEQT_DATA_DIR ".") +ELSE(WIN32) + SET(GEQT_DATA_DIR ${RYZOM_SHARE_PREFIX}/georges_editor_qt/data) + + CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/geqt_config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/geqt_config.h) + INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}) + + ADD_DEFINITIONS(-DHAVE_GEQT_CONFIG_H) +ENDIF(WIN32) ADD_SUBDIRECTORY(src) INSTALL(DIRECTORY data/ - DESTINATION ${RYZOM_SHARE_PREFIX}/georges_editor_qt/data + DESTINATION ${GEQT_DATA_DIR} COMPONENT data PATTERN "CVS" EXCLUDE PATTERN ".svn" EXCLUDE diff --git a/code/ryzom/tools/leveldesign/georges_editor_qt/geqt_config.h.cmake b/code/ryzom/tools/leveldesign/georges_editor_qt/geqt_config.h.cmake new file mode 100644 index 000000000..6f31bc7d0 --- /dev/null +++ b/code/ryzom/tools/leveldesign/georges_editor_qt/geqt_config.h.cmake @@ -0,0 +1,6 @@ +#ifndef GEQT_CONFIG_H +#define GEQT_CONFIG_H + +#define DATA_DIR "${RYZOM_SHARE_ABSOLUTE_PREFIX}/georges_editor_qt" + +#endif diff --git a/code/ryzom/tools/leveldesign/georges_editor_qt/src/main.cpp b/code/ryzom/tools/leveldesign/georges_editor_qt/src/main.cpp index fc6f5b849..3b0d606d3 100644 --- a/code/ryzom/tools/leveldesign/georges_editor_qt/src/main.cpp +++ b/code/ryzom/tools/leveldesign/georges_editor_qt/src/main.cpp @@ -21,6 +21,10 @@ #include "modules.h" #include "georges_splash.h" +#ifdef HAVE_GEQT_CONFIG_H +#include "geqt_config.h" +#endif + // nel_qt log file name #define NLQT_LOG_FILE "nel_qt.log"