diff options
author | Oswald Buddenhagen <oswald.buddenhagen@qt.io> | 2017-05-22 17:50:30 +0200 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@qt.io> | 2017-05-22 18:20:59 +0200 |
commit | 9c333ade1a1b694fc6ce22e483f5de3e952c17ad (patch) | |
tree | d3a2e41de3501f91ebfdc8ec81a80156597c2585 /sources/shiboken2/shibokenmodule/CMakeLists.txt | |
parent | 8f3761d8eac7780393382ab54dbdb487eb4df027 (diff) |
move everying into sources/shiboken2 (5.9 edition)
in preparation for a subtree merge.
this should not be necessary to do in a separate commit, but git is a
tad stupid about following history correctly without it.
Diffstat (limited to 'sources/shiboken2/shibokenmodule/CMakeLists.txt')
-rw-r--r-- | sources/shiboken2/shibokenmodule/CMakeLists.txt | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/sources/shiboken2/shibokenmodule/CMakeLists.txt b/sources/shiboken2/shibokenmodule/CMakeLists.txt new file mode 100644 index 000000000..7e90b51ab --- /dev/null +++ b/sources/shiboken2/shibokenmodule/CMakeLists.txt @@ -0,0 +1,40 @@ +project(shibokenmodule) + +configure_file("${CMAKE_CURRENT_SOURCE_DIR}/shibokenmodule.txt.in" + "${CMAKE_CURRENT_BINARY_DIR}/shibokenmodule.txt" @ONLY) + + +set(sample_SRC +${CMAKE_CURRENT_BINARY_DIR}/shiboken2/shiboken2_module_wrapper.cpp +) + +add_custom_command(OUTPUT ${sample_SRC} +# Note: shiboken2 is an executable target. By not specifying its explicit +# path, CMAKE figures it out, itself! +# This fixes an issue with Visual Studio, see https://github.com/PySide/shiboken2/pull/11 +COMMAND shiboken2 --project-file=${CMAKE_CURRENT_BINARY_DIR}/shibokenmodule.txt ${GENERATOR_EXTRA_FLAGS} +WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} +COMMENT "Running generator for 'shiboken2'..." +) + +include_directories(${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_SOURCE_DIR} + ${SBK_PYTHON_INCLUDE_DIR} + ${libshiboken_SOURCE_DIR} + ${libshiboken_BINARY_DIR}) +add_library(shibokenmodule MODULE ${sample_SRC}) +set_property(TARGET shibokenmodule PROPERTY PREFIX "") +set_property(TARGET shibokenmodule PROPERTY OUTPUT_NAME "shiboken2") +if(WIN32) + if(CMAKE_BUILD_TYPE STREQUAL "Debug") + set_property(TARGET shibokenmodule PROPERTY OUTPUT_NAME "shiboken2_d") + endif() + set_property(TARGET shibokenmodule PROPERTY SUFFIX ".pyd") +endif() +target_link_libraries(shibokenmodule + ${SBK_PYTHON_LIBRARIES} + libshiboken) + +add_dependencies(shibokenmodule shiboken2) + +install(TARGETS shibokenmodule DESTINATION ${PYTHON_SITE_PACKAGES})
\ No newline at end of file |