mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
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:
@@ -2,13 +2,11 @@
|
||||
ADD_SUBDIRECTORY(test)
|
||||
ADD_SUBDIRECTORY(example)
|
||||
|
||||
IF (BUILDING_FROM_VCS)
|
||||
# Command to generate the swig-gnc-module.c wrapper file
|
||||
SET (SWIG_GNC_MODULE_C ${CMAKE_CURRENT_BINARY_DIR}/swig-gnc-module.c)
|
||||
GNC_ADD_SWIG_COMMAND (swig-gnc-module-c ${SWIG_GNC_MODULE_C} ${CMAKE_CURRENT_SOURCE_DIR}/gnc-module.i)
|
||||
ELSE()
|
||||
SET (SWIG_GNC_MODULE_C swig-gnc-module.c)
|
||||
ENDIF()
|
||||
# Command to generate the swig-gnc-module.c wrapper file
|
||||
gnc_add_swig_guile_command (swig-gnc-module-c
|
||||
SWIG_GNC_MODULE_C swig-gnc-module.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/gnc-module.i
|
||||
)
|
||||
|
||||
SET (gnc_module_SOURCES gnc-module.c)
|
||||
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
|
||||
IF (BUILDING_FROM_VCS)
|
||||
SET (SWIG_BAR_C ${CMAKE_CURRENT_BINARY_DIR}/swig-bar.c)
|
||||
GNC_ADD_SWIG_COMMAND (swig-bar-c ${SWIG_BAR_C} ${CMAKE_CURRENT_SOURCE_DIR}/bar.i bar.h)
|
||||
ELSE()
|
||||
SET (SWIG_BAR_C ${CMAKE_CURRENT_SOURCE_DIR}/swig-bar.c)
|
||||
ENDIF()
|
||||
gnc_add_swig_guile_command (swig-bar-c
|
||||
SWIG_BAR_C swig-bar.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/bar.i bar.h
|
||||
)
|
||||
|
||||
ADD_LIBRARY(bar EXCLUDE_FROM_ALL bar.c bar.h)
|
||||
ADD_LIBRARY(gncmodbar EXCLUDE_FROM_ALL gnc-mod-bar.c)
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
|
||||
IF (BUILDING_FROM_VCS)
|
||||
SET (SWIG_BAZ_C ${CMAKE_CURRENT_BINARY_DIR}/swig-baz.c)
|
||||
GNC_ADD_SWIG_COMMAND (swig-baz-c ${SWIG_BAZ_C} ${CMAKE_CURRENT_SOURCE_DIR}/baz.i baz.h)
|
||||
ELSE()
|
||||
SET (SWIG_BAZ_C ${CMAKE_CURRENT_SOURCE_DIR}/swig-baz.c)
|
||||
ENDIF()
|
||||
gnc_add_swig_guile_command (swig-baz-c
|
||||
SWIG_BAZ_C swig-baz.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/baz.i baz.h
|
||||
)
|
||||
|
||||
ADD_LIBRARY(baz EXCLUDE_FROM_ALL baz.c baz.h)
|
||||
TARGET_INCLUDE_DIRECTORIES(baz PRIVATE
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
|
||||
IF (BUILDING_FROM_VCS)
|
||||
SET (SWIG_FOO_C ${CMAKE_CURRENT_BINARY_DIR}/swig-foo.c)
|
||||
GNC_ADD_SWIG_COMMAND (swig-foo-c ${SWIG_FOO_C} ${CMAKE_CURRENT_SOURCE_DIR}/foo.i foo.h)
|
||||
ELSE()
|
||||
SET (SWIG_FOO_C ${CMAKE_CURRENT_SOURCE_DIR}/swig-foo.c)
|
||||
ENDIF()
|
||||
gnc_add_swig_guile_command (swig-foo-c
|
||||
SWIG_FOO_C swig-foo.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/foo.i foo.h
|
||||
)
|
||||
|
||||
ADD_LIBRARY(foo EXCLUDE_FROM_ALL foo.c foo.h)
|
||||
ADD_LIBRARY(gncmodfoo EXCLUDE_FROM_ALL gnc-mod-foo.c)
|
||||
|
||||
Reference in New Issue
Block a user