Rewrite gnc_add_swig_guile_command to work in dist tarball as well

When building from git it will add targets to generate the swig files.
When building from tarball it will just point at the generated source
files from the tarball.
This commit is contained in:
Geert Janssens
2018-01-29 18:54:13 +01:00
parent 36cb167b68
commit 49a936c1fd
14 changed files with 98 additions and 101 deletions

View File

@@ -2,13 +2,13 @@
ADD_SUBDIRECTORY(test)
IF (BUILDING_FROM_VCS)
SET (SWIG_CORE_UTILS_GUILE_C ${CMAKE_CURRENT_BINARY_DIR}/swig-core-utils-guile.c)
GNC_ADD_SWIG_COMMAND (swig-core-utils-guile-c ${SWIG_CORE_UTILS_GUILE_C} ${CMAKE_CURRENT_SOURCE_DIR}/core-utils.i)
ELSE()
SET(SWIG_CORE_UTILS_GUILE_C swig-core-utils-guile.c)
ENDIF()
# Command to generate the swig-core-utils-guile.c wrapper file
gnc_add_swig_guile_command (swig-core-utils-guile-c
SWIG_CORE_UTILS_GUILE_C swig-core-utils-guile.c
${CMAKE_CURRENT_SOURCE_DIR}/core-utils.i
)
# Command to generate the swig-core-utils-python.c wrapper file
gnc_add_swig_python_command (swig-core-utils-python
SWIG_CORE_UTILS_PYTHON_C SWIG_CORE_UTILS_PYTHON_PY
swig-core-utils-python.c sw_core_utils.py