Skip to content

Commit e52fae5

Browse files
committed
Transform SWIG into optional dependency.
1 parent 14b2ed1 commit e52fae5

File tree

3 files changed

+26
-13
lines changed

3 files changed

+26
-13
lines changed

cmake

Submodule cmake updated from d70889d to 813c506

source/CMakeLists.txt

Lines changed: 21 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,6 @@
99
# External dependencies
1010
#
1111

12-
# SWIG
13-
find_package(SWIG REQUIRED)
14-
15-
if(NOT SWIG_FOUND)
16-
message(STATUS "Swig not found")
17-
return()
18-
endif()
19-
20-
include(${SWIG_USE_FILE})
21-
2212
# MetaCall Library
2313
find_package(MetaCall REQUIRED)
2414

@@ -30,11 +20,30 @@ endif()
3020
include_directories(${METACALL_INCLUDE_DIRS})
3121

3222
#
33-
# Port languages
23+
# Port languages (Standalone)
3424
#
3525

36-
add_subdirectory(cs_port)
3726
add_subdirectory(cxx_port)
27+
28+
#
29+
# External dependencies
30+
#
31+
32+
# SWIG
33+
find_package(SWIG)
34+
35+
if(NOT SWIG_FOUND)
36+
message(STATUS "Swig not found")
37+
return()
38+
endif()
39+
40+
include(${SWIG_USE_FILE})
41+
42+
#
43+
# Port languages (Swig)
44+
#
45+
46+
add_subdirectory(cs_port)
3847
add_subdirectory(d_port)
3948
add_subdirectory(go_port)
4049
add_subdirectory(java_port)

source/py_port/interface/py_port/py_port.i

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,10 @@
4545

4646
%init
4747
%{
48+
metacall_log_stdio_type log_stdio = { stdout };
49+
50+
(void)metacall_log(METACALL_LOG_STDIO, (void *)&log_stdio);
51+
4852
metacall_initialize();
4953
%}
5054

0 commit comments

Comments
 (0)