Add src/calculation and src/app-utils to cmake build system.

app-utils is needed for the conversion from and to string
for gnc_numeric, date, and other values.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@18905 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Christian Stimming 2010-03-14 21:01:32 +00:00
parent 08c0fb3fa0
commit eba463bb30
7 changed files with 123 additions and 1 deletions

View File

@ -50,6 +50,10 @@ FIND_LIBRARY (LIBINTL_LIBRARY NAMES intl)
FIND_PATH (REGEX_INCLUDE_PATH NAMES regex.h
PATHS /usr/include /opt/gnome/include)
FIND_LIBRARY (REGEX_LIBRARY NAMES regex)
IF (WIN32)
FIND_PATH (HTMLHELP_INCLUDE_PATH NAMES htmlhelp.h
PATHS /usr/include)
ENDIF (WIN32)
# ############################################################

View File

@ -390,6 +390,7 @@ function inst_guile() {
#ifdef _MSC_VER
# undef HAVE_STDINT_H
# undef HAVE_INTTYPES_H
# undef HAVE_UNISTD_H
#endif
EOF
# Also, for MSVC compiler we need to create an import library

View File

@ -138,6 +138,8 @@ ADD_SUBDIRECTORY (gnc-module)
ADD_SUBDIRECTORY (engine)
ADD_SUBDIRECTORY (backend/xml)
ADD_SUBDIRECTORY (business/business-core)
ADD_SUBDIRECTORY (calculation)
ADD_SUBDIRECTORY (app-utils)
ADD_SUBDIRECTORY (gnc)

View File

@ -0,0 +1,82 @@
# CMakeLists.txt for src/engine
ADD_DEFINITIONS (-DG_LOG_DOMAIN=\"gnc.app-utils\")
INCLUDE_DIRECTORIES (${GLIB2_INCLUDE_DIRS})
INCLUDE_DIRECTORIES (${GCONF2_INCLUDE_DIRS})
INCLUDE_DIRECTORIES (${LIBINTL_INCLUDE_PATH})
INCLUDE_DIRECTORIES (${REGEX_INCLUDE_PATH})
INCLUDE_DIRECTORIES (${GUILE_INCLUDE_DIRS})
INCLUDE_DIRECTORIES (${HTMLHELP_INCLUDE_PATH})
INCLUDE_DIRECTORIES (${CMAKE_BINARY_DIR}/src ) # for config.h
INCLUDE_DIRECTORIES (${CMAKE_SOURCE_DIR}/lib/libc) # for pow.h
INCLUDE_DIRECTORIES (${CMAKE_SOURCE_DIR}/src ) # for gnc-ui.h
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_SOURCE_DIR}/src/calculation) # for finproto.h
INCLUDE_DIRECTORIES (${CMAKE_SOURCE_DIR}/src/engine) # for gnc-engine.h
INCLUDE_DIRECTORIES (${CMAKE_BINARY_DIR}/src/engine) # for swig-runtime.h
INCLUDE_DIRECTORIES (${CMAKE_CURRENT_SOURCE_DIR}) # for <option-util.h>
SET (app_utils_HEADERS
file-utils.h
gfec.h
gnc-basic-gobject.h
gnc-account-merge.h
gnc-accounting-period.h
gnc-component-manager.h
gnc-druid.h
gnc-druid-cb.h
gnc-druid-provider.h
gnc-druid-provider-desc.h
gnc-druid-provider-desc-edge.h
gnc-druid-provider-desc-file.h
gnc-druid-provider-desc-multifile.h
gnc-druid-provider-file-cb.h
gnc-exp-parser.h
gnc-gettext-util.h
gnc-help-utils.h
gnc-helpers.h
gnc-sx-instance-model.h
gnc-ui-common.h
guile-util.h
option-util.h
)
# Command to generate the swig-app-utils.c wrapper file
SET (SWIG_APP_UTILS_C ${CMAKE_CURRENT_BINARY_DIR}/swig-app-utils.c)
GNC_ADD_SWIG_COMMAND (${SWIG_APP_UTILS_C} ${CMAKE_CURRENT_SOURCE_DIR}/app-utils.i)
SET (app_utils_SOURCES
file-utils.c
gfec.c
gnc-account-merge.c
gnc-accounting-period.c
gnc-component-manager.c
gnc-druid.c
gnc-druid-cb.c
gnc-druid-provider.c
gnc-druid-provider-desc.c
gnc-druid-provider-desc-edge.c
gnc-druid-provider-desc-file.c
gnc-druid-provider-desc-multifile.c
gnc-druid-provider-file-cb.c
gnc-exp-parser.c
gnc-gettext-util.c
gnc-helpers.c
gnc-sx-instance-model.c
gncmod-app-utils.c
guile-util.c
option-util.c
${SWIG_APP_UTILS_C}
)
IF (WIN32)
SET (app_utils_SOURCES ${app_utils_SOURCES} gnc-help-utils.c)
ENDIF (WIN32)
ADD_LIBRARY (app-utils
${app_utils_SOURCES}
${app_utils_HEADERS}
)

View File

@ -0,0 +1,32 @@
# CMakeLists.txt for src/calculation
INCLUDE_DIRECTORIES (${GLIB2_INCLUDE_DIRS})
INCLUDE_DIRECTORIES (${LIBINTL_INCLUDE_PATH})
INCLUDE_DIRECTORIES (${REGEX_INCLUDE_PATH})
INCLUDE_DIRECTORIES (${GUILE_INCLUDE_DIRS})
INCLUDE_DIRECTORIES (${CMAKE_BINARY_DIR}/src ) # for config.h
INCLUDE_DIRECTORIES (${CMAKE_SOURCE_DIR}/src ) # for gnc-ui.h
INCLUDE_DIRECTORIES (${CMAKE_SOURCE_DIR}/src/libqof/qof) # for qof.h
INCLUDE_DIRECTORIES (${CMAKE_SOURCE_DIR}/lib/libc) # for pow.h
INCLUDE_DIRECTORIES (${CMAKE_SOURCE_DIR}/src/gnc-module) # for gnc-module.h
SET (calculation_SOURCES
expression_parser.c
fin.c
gncmod-calculation.c
)
# Add dependency on config.h
SET_SOURCE_FILES_PROPERTIES (${calculation_SOURCES} PROPERTIES OBJECT_DEPENDS ${CONFIG_H})
SET (calculation_HEADERS
finvar.h
finproto.h
fin_spl_protos.h
fin_static_proto.h
)
ADD_LIBRARY (calculation
${calculation_SOURCES}
${calculation_HEADERS}
)

View File

@ -11,7 +11,7 @@ INCLUDE_DIRECTORIES (${CMAKE_BINARY_DIR}/src ) # for config.h
INCLUDE_DIRECTORIES (${CMAKE_SOURCE_DIR}/lib/libc) # for pow.h
INCLUDE_DIRECTORIES (${CMAKE_SOURCE_DIR}/src ) # for gnc-ui.h
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/gnc-module) # for gnc-module.h
INCLUDE_DIRECTORIES (${CMAKE_SOURCE_DIR}/src/core-utils) # for gnc-glib-utils.h
INCLUDE_DIRECTORIES (${CMAKE_CURRENT_SOURCE_DIR}) # for <Account.h>
INCLUDE_DIRECTORIES (${CMAKE_CURRENT_BINARY_DIR}) # for iso-4217-currencies.c

View File

@ -81,6 +81,7 @@ ADD_EXECUTABLE (cutecash
TARGET_LINK_LIBRARIES (cutecash business-core)
TARGET_LINK_LIBRARIES (cutecash gnc-backend-xml)
TARGET_LINK_LIBRARIES (cutecash app-utils calculation)
TARGET_LINK_LIBRARIES (cutecash engine gnc-module core-utils qof)
TARGET_LINK_LIBRARIES (cutecash ${GCONF2_LIBRARIES})
TARGET_LINK_LIBRARIES (cutecash ${GTHREAD_LIBRARIES} ${GOBJECT_LIBRARIES} ${GMODULE_LIBRARIES} ${GLIB2_LIBRARIES})