diff --git a/src/core-utils/CMakeLists.txt b/src/core-utils/CMakeLists.txt index 7b22980114..c8c924cf2f 100644 --- a/src/core-utils/CMakeLists.txt +++ b/src/core-utils/CMakeLists.txt @@ -9,30 +9,49 @@ INCLUDE_DIRECTORIES (${REGEX_INCLUDE_PATH}) INCLUDE_DIRECTORIES (${LIBGUILE_INCLUDE_PATH}) INCLUDE_DIRECTORIES (${CMAKE_BINARY_DIR}/src ) # for config.h INCLUDE_DIRECTORIES (${CMAKE_CURRENT_SOURCE_DIR}/..) # for gnc-ui.h +INCLUDE_DIRECTORIES (${CMAKE_CURRENT_SOURCE_DIR}/../libqof/qof) # for gnc-ui.h INCLUDE_DIRECTORIES (${CMAKE_CURRENT_SOURCE_DIR}) # when building swig-core-utils.c +INCLUDE_DIRECTORIES (${CMAKE_CURRENT_BINARY_DIR}) # for gncla-dir.h # Command to generate the swig-engine.c wrapper file SET (SWIG_CORE_UTILS_C ${CMAKE_CURRENT_BINARY_DIR}/swig-core-utils.c) GNC_ADD_SWIG_COMMAND (${SWIG_CORE_UTILS_C} ${CMAKE_CURRENT_SOURCE_DIR}/core-utils.i) SET (libgnc_core_utils_SOURCES - gnc-main.c + binreloc.c + gnc-filepath-utils.c gnc-gconf-utils.c gnc-gdate-utils.c gnc-gkeyfile-utils.c gnc-glib-utils.c + gnc-main.c + gnc-path.c ${SWIG_CORE_UTILS_C} ) # Add dependency on config.h SET_SOURCE_FILES_PROPERTIES (${libgnc_core_utils_SOURCES} PROPERTIES OBJECT_DEPENDS ${CONFIG_H}) +# Workaround to create a very simple gncla-dir.h file +FILE (WRITE ${CMAKE_CURRENT_BINARY_DIR}/gncla-dir.h.tmp " +#define PREFIX \"${CMAKE_INSTALL_PREFIX}\" +#define DATADIR \"${CMAKE_INSTALL_PREFIX}/share\" +#define SYSCONFDIR \"${CMAKE_INSTALL_PREFIX}/etc\" +#define LIBDIR \"${CMAKE_INSTALL_PREFIX}/lib\" +#define LOCALE_DATADIRNAME \"share\" +") +# Let cmake copy the created file only on changes. +CONFIGURE_FILE (${CMAKE_CURRENT_BINARY_DIR}/gncla-dir.h.tmp ${CMAKE_CURRENT_BINARY_DIR}/gncla-dir.h COPYONLY) + SET (libgnc_core_utils_HEADERS - gnc-main.h + binreloc.h + gnc-filepath-utils.h gnc-gconf-utils.h gnc-gdate-utils.h gnc-gkeyfile-utils.h gnc-glib-utils.h + gnc-main.h + gnc-path.h ) ADD_LIBRARY (core-utils diff --git a/src/engine/CMakeLists.txt b/src/engine/CMakeLists.txt index 78313f5fea..c490512442 100644 --- a/src/engine/CMakeLists.txt +++ b/src/engine/CMakeLists.txt @@ -12,7 +12,7 @@ INCLUDE_DIRECTORIES (${CMAKE_SOURCE_DIR}/src/libqof/qof) # for qof.h INCLUDE_DIRECTORIES (${CMAKE_SOURCE_DIR}/src/gnc-module) # for gnc-glib-utils.h INCLUDE_DIRECTORIES (${CMAKE_SOURCE_DIR}/src/core-utils) # for gnc-glib-utils.h INCLUDE_DIRECTORIES (${CMAKE_CURRENT_SOURCE_DIR}) # for -INCLUDE_DIRECTORIES (${CMAKE_CURRENT_BINARY_DIR}) # for gncla-dir.h +INCLUDE_DIRECTORIES (${CMAKE_CURRENT_BINARY_DIR}) # for iso-4217-currencies.c SET (libgncmod_engine_HEADERS Account.h @@ -33,7 +33,6 @@ SET (libgncmod_engine_HEADERS Split.h TransLog.h Transaction.h - binreloc.h cap-gains.h cashobjects.h engine-helpers.h @@ -43,9 +42,7 @@ SET (libgncmod_engine_HEADERS gnc-commodity.h gnc-engine.h gnc-event.h - gnc-filepath-utils.h gnc-hooks.h - gnc-path.h gnc-pricedb.h gnc-session.h gnc-session-scm.h @@ -58,17 +55,6 @@ SET (libgncmod_engine_HEADERS SET (SWIG_ENGINE_C ${CMAKE_CURRENT_BINARY_DIR}/swig-engine.c) GNC_ADD_SWIG_COMMAND (${SWIG_ENGINE_C} ${CMAKE_CURRENT_SOURCE_DIR}/engine.i) -# Workaround to create a very simple gncla-dir.h file -FILE (WRITE ${CMAKE_CURRENT_BINARY_DIR}/gncla-dir.h.tmp " -#define PREFIX \"${CMAKE_INSTALL_PREFIX}\" -#define DATADIR \"${CMAKE_INSTALL_PREFIX}/share\" -#define SYSCONFDIR \"${CMAKE_INSTALL_PREFIX}/etc\" -#define LIBDIR \"${CMAKE_INSTALL_PREFIX}/lib\" -#define LOCALE_DATADIRNAME \"share\" -") -# Let cmake copy the created file only on changes. -CONFIGURE_FILE (${CMAKE_CURRENT_BINARY_DIR}/gncla-dir.h.tmp ${CMAKE_CURRENT_BINARY_DIR}/gncla-dir.h COPYONLY) - # Command to generate the iso-4217-currencies.c file SET (ISO_4217_C ${CMAKE_CURRENT_BINARY_DIR}/iso-4217-currencies.c) ADD_CUSTOM_COMMAND ( @@ -106,17 +92,14 @@ SET (libgncmod_engine_SOURCES Split.c TransLog.c Transaction.c - binreloc.c cap-gains.c cashobjects.c gnc-associate-account.c gnc-budget.c gnc-commodity.c gnc-engine.c - gnc-filepath-utils.c gnc-hooks.c gnc-lot.c - gnc-path.c gnc-pricedb.c gnc-session.c gnc-session-scm.c diff --git a/src/gnc/main.cpp b/src/gnc/main.cpp index 81a0c054ce..a0c4a1f305 100644 --- a/src/gnc/main.cpp +++ b/src/gnc/main.cpp @@ -31,11 +31,11 @@ extern "C" #include #include #include "gnc-module/gnc-module.h" -#include "engine/gnc-path.h" -#include "engine/binreloc.h" +#include "core-utils/gnc-path.h" +#include "core-utils/binreloc.h" /* #include "gnc-version.h" */ #include "engine/gnc-engine.h" -#include "engine/gnc-filepath-utils.h" +#include "core-utils/gnc-filepath-utils.h" #include "engine/gnc-hooks.h" #include "engine/gnc-commodity.h" #include "core-utils/gnc-main.h" diff --git a/src/gnc/mainwindow.cpp b/src/gnc/mainwindow.cpp index dc94932518..6bf5758335 100644 --- a/src/gnc/mainwindow.cpp +++ b/src/gnc/mainwindow.cpp @@ -14,7 +14,7 @@ extern "C" #include #include "qof.h" #include "engine/gnc-hooks.h" -#include "engine/gnc-filepath-utils.h" +#include "core-utils/gnc-filepath-utils.h" #include "engine/Account.h" #include "engine/TransLog.h" }