summaryrefslogtreecommitdiffstats
path: root/tests/otherbinding/CMakeLists.txt
diff options
context:
space:
mode:
authorMarcelo Lira <marcelo.lira@openbossa.org>2009-12-08 11:24:48 -0300
committerMarcelo Lira <marcelo.lira@openbossa.org>2009-12-29 15:42:30 -0300
commitef1d065f23b6e9c206cb44b5fd2c36708bb238ca (patch)
treee5329086a9dc5c4e8dfaa9d92af42ea4b86cd0e2 /tests/otherbinding/CMakeLists.txt
parente67ea3ffab7c161785636b78c41f3b624ec0f5ab (diff)
downloadshiboken-ef1d065f23b6e9c206cb44b5fd2c36708bb238ca.tar.gz
shiboken-ef1d065f23b6e9c206cb44b5fd2c36708bb238ca.tar.xz
shiboken-ef1d065f23b6e9c206cb44b5fd2c36708bb238ca.zip
Adds "libother" as a new test library.
New test library and corresponding binding were added to check for intermodule problems. The CMake linkage type for the modules had to be changed from MODULE to SHARED. Reviewed by Hugo Parente <hugo.lima@openbossa.org>
Diffstat (limited to 'tests/otherbinding/CMakeLists.txt')
-rw-r--r--tests/otherbinding/CMakeLists.txt44
1 files changed, 44 insertions, 0 deletions
diff --git a/tests/otherbinding/CMakeLists.txt b/tests/otherbinding/CMakeLists.txt
new file mode 100644
index 00000000..164870c0
--- /dev/null
+++ b/tests/otherbinding/CMakeLists.txt
@@ -0,0 +1,44 @@
+project(other)
+
+set(other_TYPESYSTEM
+${CMAKE_CURRENT_SOURCE_DIR}/typesystem_other.xml
+)
+
+set(other_SRC
+${CMAKE_CURRENT_BINARY_DIR}/other/otherderived_wrapper.cpp
+${CMAKE_CURRENT_BINARY_DIR}/other/other_module_wrapper.cpp
+)
+
+find_program(GENERATOR generatorrunner REQUIRED)
+
+add_custom_command(OUTPUT ${other_SRC}
+COMMAND ${GENERATOR} --generatorSet=${shiboken_BINARY_DIR}/shiboken_generator --enable-parent-ctor-heuristic
+ ${CMAKE_CURRENT_SOURCE_DIR}/global.h
+ --include-paths=${libother_SOURCE_DIR}:${libsample_SOURCE_DIR}:${libsample_SOURCE_DIR}/..
+ --typesystem-paths=${CMAKE_CURRENT_SOURCE_DIR}:${sample_SOURCE_DIR}
+ --output-directory=${CMAKE_CURRENT_BINARY_DIR}
+ ${other_TYPESYSTEM}
+WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+COMMENT "Running generator for test binding..."
+)
+
+include_directories(${CMAKE_CURRENT_SOURCE_DIR}
+ ${CMAKE_SOURCE_DIR}
+ ${PYTHON_INCLUDE_PATH}
+ ${libother_SOURCE_DIR}
+ ${libsample_SOURCE_DIR}
+ ${libsample_SOURCE_DIR}/..
+ ${sample_BINARY_DIR}
+ ${sample_BINARY_DIR}/sample
+ ${libshiboken_SOURCE_DIR})
+add_library(other SHARED ${other_SRC})
+set_property(TARGET other PROPERTY PREFIX "")
+target_link_libraries(other
+ libother
+ libsample
+ sample
+ ${PYTHON_LIBRARIES}
+ libshiboken)
+
+add_dependencies(other sample shiboken_generator)
+