diff options
author | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-04-24 16:09:47 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@qt.io> | 2019-04-24 16:09:47 +0200 |
commit | dc4ad7f211db52d614426c4f2b7b808c6200ae85 (patch) | |
tree | e5c62361c4c6a296478a207d4e6fe1df27f36d18 /sources/shiboken2/generator/CMakeLists.txt | |
parent | 6c7e60e7f608b80bc2823ba5e3ff58df76927cbc (diff) | |
parent | 8b892f71b749a623724ccecca881972a33c9d559 (diff) |
Merge remote-tracking branch 'origin/5.13' into dev
Change-Id: Ieb5a4ac5d5d33fe1e93e1d286f1b88d45f31db06
Diffstat (limited to 'sources/shiboken2/generator/CMakeLists.txt')
-rw-r--r-- | sources/shiboken2/generator/CMakeLists.txt | 33 |
1 files changed, 12 insertions, 21 deletions
diff --git a/sources/shiboken2/generator/CMakeLists.txt b/sources/shiboken2/generator/CMakeLists.txt index 943e8d19b..745c366f5 100644 --- a/sources/shiboken2/generator/CMakeLists.txt +++ b/sources/shiboken2/generator/CMakeLists.txt @@ -1,8 +1,5 @@ project(shibokengenerator) -find_package(Qt5Xml) -find_package(Qt5XmlPatterns) - set(shiboken2_SRC generator.cpp shiboken2/cppgenerator.cpp @@ -12,29 +9,23 @@ shiboken2/shibokengenerator.cpp main.cpp ) -if (NOT DISABLE_DOCSTRINGS) - set(shiboken2_SRC ${shiboken2_SRC} qtdoc/qtdocgenerator.cpp) - add_definitions(-DDOCSTRINGS_ENABLED) -endif() - -include_directories(${CMAKE_CURRENT_SOURCE_DIR}/shiboken2 +add_executable(shiboken2 ${shiboken2_SRC}) +add_executable(Shiboken2::shiboken2 ALIAS shiboken2) +add_dependencies(shiboken2 apiextractor) +set_target_properties(shiboken2 PROPERTIES OUTPUT_NAME shiboken2${shiboken2_SUFFIX}) +target_include_directories(shiboken2 PRIVATE + ${CMAKE_CURRENT_SOURCE_DIR}/shiboken2 ${CMAKE_CURRENT_SOURCE_DIR}/qtdoc ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR} ${apiextractor_SOURCE_DIR} - ${Qt5Core_INCLUDE_DIRS} - ${Qt5XmlPatterns_INCLUDE_DIRS} ) - -add_executable(shiboken2 ${shiboken2_SRC}) -add_executable(Shiboken2::shiboken2 ALIAS shiboken2) -add_dependencies(shiboken2 apiextractor) -set_target_properties(shiboken2 PROPERTIES OUTPUT_NAME shiboken2${shiboken2_SUFFIX}) -target_link_libraries(shiboken2 - apiextractor - ${Qt5Core_LIBRARIES} - ${Qt5XmlPatterns_LIBRARIES} - ) +target_link_libraries(shiboken2 apiextractor Qt5::Core) +if (NOT DISABLE_DOCSTRINGS) + target_sources(shiboken2 PRIVATE qtdoc/qtdocgenerator.cpp) + target_compile_definitions(shiboken2 PUBLIC DOCSTRINGS_ENABLED) + target_link_libraries(shiboken2 Qt5::XmlPatterns) +endif() configure_file(shibokenconfig.h.in "${CMAKE_CURRENT_BINARY_DIR}/shibokenconfig.h" @ONLY) |