2010-02-25 11:42:00 -06:00
|
|
|
# CMakeLists.txt for src/core-utils
|
2010-02-24 13:44:59 -06:00
|
|
|
|
|
|
|
ADD_DEFINITIONS (-DG_LOG_DOMAIN=\"gnc.core-utils\")
|
|
|
|
|
|
|
|
INCLUDE_DIRECTORIES (${GLIB2_INCLUDE_DIRS})
|
|
|
|
INCLUDE_DIRECTORIES (${GCONF2_INCLUDE_DIRS})
|
|
|
|
INCLUDE_DIRECTORIES (${LIBINTL_INCLUDE_PATH})
|
|
|
|
INCLUDE_DIRECTORIES (${REGEX_INCLUDE_PATH})
|
2010-03-06 05:00:54 -06:00
|
|
|
INCLUDE_DIRECTORIES (${GUILE_INCLUDE_DIRS})
|
2010-03-04 11:48:36 -06:00
|
|
|
INCLUDE_DIRECTORIES (${CMAKE_BINARY_DIR}/src ) # for config.h
|
|
|
|
INCLUDE_DIRECTORIES (${CMAKE_CURRENT_SOURCE_DIR}/..) # for gnc-ui.h
|
2010-03-04 13:50:45 -06:00
|
|
|
INCLUDE_DIRECTORIES (${CMAKE_CURRENT_SOURCE_DIR}/../libqof/qof) # for gnc-ui.h
|
2010-02-25 11:42:00 -06:00
|
|
|
INCLUDE_DIRECTORIES (${CMAKE_CURRENT_SOURCE_DIR}) # when building swig-core-utils.c
|
2010-12-12 06:04:00 -06:00
|
|
|
INCLUDE_DIRECTORIES (${CMAKE_CURRENT_BINARY_DIR}) # for gncla-dir.h, gnc-version.h
|
2010-02-24 13:44:59 -06:00
|
|
|
|
2010-02-25 11:42:00 -06:00
|
|
|
# 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)
|
2010-02-24 13:44:59 -06:00
|
|
|
|
|
|
|
SET (libgnc_core_utils_SOURCES
|
2010-03-04 13:50:45 -06:00
|
|
|
binreloc.c
|
2013-11-18 02:00:34 -06:00
|
|
|
gnc-prefs.c
|
2010-03-04 13:50:45 -06:00
|
|
|
gnc-filepath-utils.c
|
2012-02-19 14:32:41 -06:00
|
|
|
gnc-features.c
|
2010-02-25 11:42:21 -06:00
|
|
|
gnc-gdate-utils.c
|
|
|
|
gnc-gkeyfile-utils.c
|
|
|
|
gnc-glib-utils.c
|
2013-02-08 14:47:42 -06:00
|
|
|
gnc-guile-utils.c
|
2010-03-07 07:51:54 -06:00
|
|
|
gnc-jalali.c
|
2011-02-02 14:31:10 -06:00
|
|
|
gnc-locale-utils.c
|
2010-03-04 13:50:45 -06:00
|
|
|
gnc-path.c
|
2010-03-05 14:32:13 -06:00
|
|
|
gnc-uri-utils.c
|
2010-02-25 11:42:00 -06:00
|
|
|
${SWIG_CORE_UTILS_C}
|
2010-02-24 13:44:59 -06:00
|
|
|
)
|
|
|
|
|
2010-02-27 05:37:14 -06:00
|
|
|
# Add dependency on config.h
|
|
|
|
SET_SOURCE_FILES_PROPERTIES (${libgnc_core_utils_SOURCES} PROPERTIES OBJECT_DEPENDS ${CONFIG_H})
|
|
|
|
|
2013-02-08 14:47:42 -06:00
|
|
|
# Command to generate the swig-runtime.h header
|
|
|
|
ADD_CUSTOM_COMMAND (
|
|
|
|
OUTPUT ${SWIG_RUNTIME_H}
|
|
|
|
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
|
|
|
COMMAND ${SWIG_EXECUTABLE} -guile -external-runtime ${SWIG_RUNTIME_H}
|
|
|
|
)
|
|
|
|
|
|
|
|
# Add dependency on swig-runtime.h
|
|
|
|
SET_SOURCE_FILES_PROPERTIES (gnc-guile-utils.c PROPERTIES OBJECT_DEPENDS ${SWIG_RUNTIME_H})
|
|
|
|
|
2010-03-04 13:50:45 -06:00
|
|
|
# Workaround to create a very simple gncla-dir.h file
|
2010-03-17 14:24:01 -05:00
|
|
|
FILE (WRITE ${CMAKE_CURRENT_BINARY_DIR}/gncla-dir.h "
|
2010-03-04 13:50:45 -06:00
|
|
|
#define PREFIX \"${CMAKE_INSTALL_PREFIX}\"
|
|
|
|
#define DATADIR \"${CMAKE_INSTALL_PREFIX}/share\"
|
|
|
|
#define SYSCONFDIR \"${CMAKE_INSTALL_PREFIX}/etc\"
|
|
|
|
#define LIBDIR \"${CMAKE_INSTALL_PREFIX}/lib\"
|
2010-10-24 04:17:23 -05:00
|
|
|
#define BINDIR \"${CMAKE_INSTALL_PREFIX}/bin\"
|
2010-03-04 13:50:45 -06:00
|
|
|
#define LOCALE_DATADIRNAME \"share\"
|
|
|
|
")
|
|
|
|
|
2013-02-08 14:47:42 -06:00
|
|
|
# Workaround to create a simple gnc-version.h file
|
2010-12-12 06:04:00 -06:00
|
|
|
FILE (WRITE ${CMAKE_CURRENT_BINARY_DIR}/gnc-version.h "
|
|
|
|
/* Autogenerated. Do not change. */
|
|
|
|
#ifndef GNC_VERSION_H
|
|
|
|
#define GNC_VERSION_H
|
|
|
|
|
|
|
|
#define GNUCASH_SVN 1
|
|
|
|
#define GNUCASH_BUILD_DATE \"2010-XX-XX\"
|
|
|
|
#define GNUCASH_SVN_REV \"xxxxxxx\"
|
|
|
|
#endif
|
|
|
|
")
|
|
|
|
|
2010-02-24 13:44:59 -06:00
|
|
|
SET (libgnc_core_utils_HEADERS
|
2010-03-04 13:50:45 -06:00
|
|
|
binreloc.h
|
2013-11-18 02:00:34 -06:00
|
|
|
gnc-prefs.h
|
|
|
|
gnc-prefs-p.h
|
2012-02-19 14:32:41 -06:00
|
|
|
gnc-features.h
|
2010-03-04 13:50:45 -06:00
|
|
|
gnc-filepath-utils.h
|
2010-02-25 11:42:21 -06:00
|
|
|
gnc-gdate-utils.h
|
|
|
|
gnc-gkeyfile-utils.h
|
2010-02-24 13:44:59 -06:00
|
|
|
gnc-glib-utils.h
|
2013-02-08 14:47:42 -06:00
|
|
|
gnc-guile-utils.h
|
2010-03-07 07:51:54 -06:00
|
|
|
gnc-jalali.h
|
2011-02-02 14:31:10 -06:00
|
|
|
gnc-locale-utils.h
|
2010-03-04 13:50:45 -06:00
|
|
|
gnc-path.h
|
2010-03-05 14:32:13 -06:00
|
|
|
gnc-uri-utils.h
|
2010-02-24 13:44:59 -06:00
|
|
|
)
|
|
|
|
|
|
|
|
ADD_LIBRARY (core-utils
|
|
|
|
${libgnc_core_utils_SOURCES}
|
|
|
|
${libgnc_core_utils_HEADERS}
|
|
|
|
)
|