mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Improve handling of generated distributable files
- the two dist_add_... macros now both take a list of file names as argument so more files can be added at once to the dist tarball. - dist_add_generated now creates the right target by itself. There's no need to pass one any more - make the swig generated *.py module files explicit output files - change a couple of custom_targets into custom_commands. The only reason they were defined as targets was to ensure they got built before the dist tarball. This is now properly handled by the dist_add_... macros. - correctly handle dependency on swig-runtime.h (using OBJECT_DEPENDS was not the way to do it according to that property's help page)
This commit is contained in:
@@ -134,7 +134,7 @@ ADD_CUSTOM_COMMAND (
|
||||
${LIBXSLT_XSLTPROC_EXECUTABLE} -o ${ISO_4217_C} "${CMAKE_CURRENT_SOURCE_DIR}/iso-currencies-to-c.xsl" "${CMAKE_CURRENT_SOURCE_DIR}/iso-4217-currencies.xml"
|
||||
)
|
||||
ADD_CUSTOM_TARGET(iso-4217-c DEPENDS ${ISO_4217_C})
|
||||
dist_add_generated(iso-4217-c iso-4217-currencies.c)
|
||||
dist_add_generated(iso-4217-currencies.c)
|
||||
|
||||
SET (engine_SOURCES
|
||||
Account.cpp
|
||||
@@ -221,9 +221,6 @@ SET_SOURCE_FILES_PROPERTIES (${engine_SOURCES} PROPERTIES OBJECT_DEPENDS ${CONFI
|
||||
# Add dependency on iso-4217-currencies.c
|
||||
SET_SOURCE_FILES_PROPERTIES (gnc-commodity.c PROPERTIES OBJECT_DEPENDS "${ISO_4217_C};${CONFIG_H}")
|
||||
|
||||
# Add dependency on swig-runtime.h
|
||||
SET_SOURCE_FILES_PROPERTIES (gnc-hooks.c engine-helpers.c kvp-scm.cpp glib-helpers.c PROPERTIES OBJECT_DEPENDS "${CONFIG_H};${SWIG_RUNTIME_H}")
|
||||
|
||||
|
||||
|
||||
ADD_LIBRARY (gncmod-engine
|
||||
@@ -233,6 +230,9 @@ ADD_LIBRARY (gncmod-engine
|
||||
${engine_noinst_HEADERS}
|
||||
)
|
||||
|
||||
# Add dependency on swig-runtime.h
|
||||
add_dependencies (gncmod-engine swig-runtime-h)
|
||||
|
||||
TARGET_LINK_LIBRARIES(gncmod-engine gnc-core-utils gnc-module ${Boost_DATE_TIME_LIBRARIES} ${Boost_REGEX_LIBRARIES} ${REGEX_LDFLAGS} ${GMODULE_LDFLAGS} ${GLIB2_LDFLAGS} ${GOBJECT_LDFLAGS} ${GUILE_LDFLAGS})
|
||||
|
||||
TARGET_COMPILE_DEFINITIONS (gncmod-engine PRIVATE -DG_LOG_DOMAIN=\"gnc.engine\")
|
||||
|
||||
Reference in New Issue
Block a user