diff options
author | Eike Ziller <eike.ziller@qt.io> | 2019-05-28 16:08:27 +0200 |
---|---|---|
committer | Eike Ziller <eike.ziller@qt.io> | 2019-05-29 13:26:35 +0000 |
commit | 0bbc5ef57465b94c63fed1cf8255a9b2a07e981c (patch) | |
tree | 30a67c1413fcdb047215979d07b4313753888e0f /src/tools | |
parent | 0a88ad3c27853069acf400fa6353170095c18c93 (diff) | |
download | qt-creator-0bbc5ef57465b94c63fed1cf8255a9b2a07e981c.tar.gz |
CMake build: Add option for disabling build of executable
So the package build can later easily separate sdktool and windows
debugging helpers etc.
Add a extend_qtc_executable similar to extend_qtc_plugin
Change-Id: Ie790e86e12b0fed41c912e8205a273ac857f3854
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Diffstat (limited to 'src/tools')
-rw-r--r-- | src/tools/iostool/CMakeLists.txt | 10 | ||||
-rw-r--r-- | src/tools/qml2puppet/CMakeLists.txt | 196 | ||||
-rw-r--r-- | src/tools/qtpromaker/CMakeLists.txt | 1 |
3 files changed, 111 insertions, 96 deletions
diff --git a/src/tools/iostool/CMakeLists.txt b/src/tools/iostool/CMakeLists.txt index 3fd94ff774..d8bd23fe3f 100644 --- a/src/tools/iostool/CMakeLists.txt +++ b/src/tools/iostool/CMakeLists.txt @@ -15,8 +15,10 @@ add_qtc_executable(iostool iosdevicemanager.cpp iosdevicemanager.h ) -if (CMAKE_VERSION VERSION_LESS 3.13) - target_link_libraries(iostool "-Wl,-sectcreate,__TEXT,__info_plist,${CMAKE_CURRENT_SOURCE_DIR}/Info.plist") -else() - target_link_options(iostool PRIVATE "-Wl,-sectcreate,__TEXT,__info_plist,${CMAKE_CURRENT_SOURCE_DIR}/Info.plist") +if (TARGET iostool) + if (CMAKE_VERSION VERSION_LESS 3.13) + target_link_libraries(iostool "-Wl,-sectcreate,__TEXT,__info_plist,${CMAKE_CURRENT_SOURCE_DIR}/Info.plist") + else() + target_link_options(iostool PRIVATE "-Wl,-sectcreate,__TEXT,__info_plist,${CMAKE_CURRENT_SOURCE_DIR}/Info.plist") + endif() endif() diff --git a/src/tools/qml2puppet/CMakeLists.txt b/src/tools/qml2puppet/CMakeLists.txt index b552c8017c..8eda7bf132 100644 --- a/src/tools/qml2puppet/CMakeLists.txt +++ b/src/tools/qml2puppet/CMakeLists.txt @@ -15,108 +15,122 @@ add_qtc_executable(qml2puppet DESTINATION ${DESTDIR} ) -function(extend_target name directory) - foreach(source ${ARGN}) - list(APPEND source_list "${directory}/${source}") - endforeach() - target_sources(${name} PRIVATE ${source_list}) - target_include_directories(${name} PUBLIC ${directory}) -endfunction() - -extend_target(qml2puppet "${SRCDIR}/commands" - changeauxiliarycommand.cpp changeauxiliarycommand.h - changebindingscommand.cpp changebindingscommand.h - changefileurlcommand.cpp changefileurlcommand.h - changeidscommand.cpp changeidscommand.h - changenodesourcecommand.cpp changenodesourcecommand.h - changestatecommand.cpp changestatecommand.h - changevaluescommand.cpp changevaluescommand.h - childrenchangedcommand.cpp childrenchangedcommand.h - clearscenecommand.cpp clearscenecommand.h - completecomponentcommand.cpp completecomponentcommand.h - componentcompletedcommand.cpp componentcompletedcommand.h - createinstancescommand.cpp createinstancescommand.h - createscenecommand.cpp createscenecommand.h - debugoutputcommand.cpp debugoutputcommand.h - endpuppetcommand.cpp endpuppetcommand.h - informationchangedcommand.cpp informationchangedcommand.h - pixmapchangedcommand.cpp pixmapchangedcommand.h - puppetalivecommand.cpp puppetalivecommand.h - removeinstancescommand.cpp removeinstancescommand.h - removepropertiescommand.cpp removepropertiescommand.h - removesharedmemorycommand.cpp removesharedmemorycommand.h - reparentinstancescommand.cpp reparentinstancescommand.h - statepreviewimagechangedcommand.cpp statepreviewimagechangedcommand.h - synchronizecommand.cpp synchronizecommand.h - tokencommand.cpp tokencommand.h - valueschangedcommand.cpp +extend_qtc_executable(qml2puppet + SOURCES_PREFIX "${SRCDIR}/commands" + SOURCES + changeauxiliarycommand.cpp changeauxiliarycommand.h + changebindingscommand.cpp changebindingscommand.h + changefileurlcommand.cpp changefileurlcommand.h + changeidscommand.cpp changeidscommand.h + changenodesourcecommand.cpp changenodesourcecommand.h + changestatecommand.cpp changestatecommand.h + changevaluescommand.cpp changevaluescommand.h + childrenchangedcommand.cpp childrenchangedcommand.h + clearscenecommand.cpp clearscenecommand.h + completecomponentcommand.cpp completecomponentcommand.h + componentcompletedcommand.cpp componentcompletedcommand.h + createinstancescommand.cpp createinstancescommand.h + createscenecommand.cpp createscenecommand.h + debugoutputcommand.cpp debugoutputcommand.h + endpuppetcommand.cpp endpuppetcommand.h + informationchangedcommand.cpp informationchangedcommand.h + pixmapchangedcommand.cpp pixmapchangedcommand.h + puppetalivecommand.cpp puppetalivecommand.h + removeinstancescommand.cpp removeinstancescommand.h + removepropertiescommand.cpp removepropertiescommand.h + removesharedmemorycommand.cpp removesharedmemorycommand.h + reparentinstancescommand.cpp reparentinstancescommand.h + statepreviewimagechangedcommand.cpp statepreviewimagechangedcommand.h + synchronizecommand.cpp synchronizecommand.h + tokencommand.cpp tokencommand.h + valueschangedcommand.cpp ) -extend_target(qml2puppet "${SRCDIR}/container" - addimportcontainer.cpp addimportcontainer.h - idcontainer.cpp idcontainer.h - imagecontainer.cpp imagecontainer.h - informationcontainer.cpp informationcontainer.h - instancecontainer.cpp instancecontainer.h - mockuptypecontainer.cpp mockuptypecontainer.h - propertyabstractcontainer.cpp propertyabstractcontainer.h - propertybindingcontainer.cpp propertybindingcontainer.h - propertyvaluecontainer.cpp propertyvaluecontainer.h - reparentcontainer.cpp reparentcontainer.h - sharedmemory.h +extend_qtc_executable(qml2puppet + SOURCES_PREFIX "${SRCDIR}/container" + SOURCES + addimportcontainer.cpp addimportcontainer.h + idcontainer.cpp idcontainer.h + imagecontainer.cpp imagecontainer.h + informationcontainer.cpp informationcontainer.h + instancecontainer.cpp instancecontainer.h + mockuptypecontainer.cpp mockuptypecontainer.h + propertyabstractcontainer.cpp propertyabstractcontainer.h + propertybindingcontainer.cpp propertybindingcontainer.h + propertyvaluecontainer.cpp propertyvaluecontainer.h + reparentcontainer.cpp reparentcontainer.h + sharedmemory.h ) -if (UNIX) - extend_target(qml2puppet "${SRCDIR}/container" sharedmemory_unix.cpp) - if (NOT APPLE) - target_link_libraries(qml2puppet PRIVATE rt) - endif() -else() - extend_target(qml2puppet "${SRCDIR}/container" sharedmemory_qt.cpp) -endif() +extend_qtc_executable(qml2puppet + CONDITION UNIX + SOURCES_PREFIX "${SRCDIR}/container" + SOURCES + sharedmemory_unix.cpp +) +extend_qtc_executable(qml2puppet + CONDITION UNIX AND (NOT APPLE) + DEPENDS rt +) +extend_qtc_executable(qml2puppet + CONDITION NOT UNIX + SOURCES_PREFIX "${SRCDIR}/container" + SOURCES + sharedmemory_qt.cpp +) -extend_target(qml2puppet "${SRCDIR}/instances" - nodeinstanceclientproxy.cpp nodeinstanceclientproxy.h +extend_qtc_executable(qml2puppet + SOURCES_PREFIX "${SRCDIR}/instances" + SOURCES + nodeinstanceclientproxy.cpp nodeinstanceclientproxy.h ) -extend_target(qml2puppet "${SRCDIR}/interfaces" - commondefines.h - nodeinstanceclientinterface.h - nodeinstanceglobal.h - nodeinstanceserverinterface.cpp nodeinstanceserverinterface.h +extend_qtc_executable(qml2puppet + SOURCES_PREFIX "${SRCDIR}/interfaces" + SOURCES + commondefines.h + nodeinstanceclientinterface.h + nodeinstanceglobal.h + nodeinstanceserverinterface.cpp nodeinstanceserverinterface.h ) -extend_target(qml2puppet "${SRCDIR}/qml2puppet/instances" - anchorchangesnodeinstance.cpp anchorchangesnodeinstance.h - behaviornodeinstance.cpp behaviornodeinstance.h - childrenchangeeventfilter.cpp childrenchangeeventfilter.h - componentnodeinstance.cpp componentnodeinstance.h - dummycontextobject.cpp dummycontextobject.h - dummynodeinstance.cpp dummynodeinstance.h - layoutnodeinstance.cpp layoutnodeinstance.h - nodeinstanceserver.cpp nodeinstanceserver.h - nodeinstancesignalspy.cpp nodeinstancesignalspy.h - objectnodeinstance.cpp objectnodeinstance.h - positionernodeinstance.cpp positionernodeinstance.h - qmlpropertychangesnodeinstance.cpp qmlpropertychangesnodeinstance.h - qmlstatenodeinstance.cpp qmlstatenodeinstance.h - qmltransitionnodeinstance.cpp qmltransitionnodeinstance.h - qt3dpresentationnodeinstance.cpp qt3dpresentationnodeinstance.h - qt5informationnodeinstanceserver.cpp qt5informationnodeinstanceserver.h - qt5nodeinstanceclientproxy.cpp qt5nodeinstanceclientproxy.h - qt5nodeinstanceserver.cpp qt5nodeinstanceserver.h - qt5previewnodeinstanceserver.cpp qt5previewnodeinstanceserver.h - qt5rendernodeinstanceserver.cpp qt5rendernodeinstanceserver.h - qt5testnodeinstanceserver.cpp qt5testnodeinstanceserver.h - quickitemnodeinstance.cpp quickitemnodeinstance.h - servernodeinstance.cpp servernodeinstance.h +extend_qtc_executable(qml2puppet + SOURCES_PREFIX "${SRCDIR}/qml2puppet/instances" + SOURCES + anchorchangesnodeinstance.cpp anchorchangesnodeinstance.h + behaviornodeinstance.cpp behaviornodeinstance.h + childrenchangeeventfilter.cpp childrenchangeeventfilter.h + componentnodeinstance.cpp componentnodeinstance.h + dummycontextobject.cpp dummycontextobject.h + dummynodeinstance.cpp dummynodeinstance.h + layoutnodeinstance.cpp layoutnodeinstance.h + nodeinstanceserver.cpp nodeinstanceserver.h + nodeinstancesignalspy.cpp nodeinstancesignalspy.h + objectnodeinstance.cpp objectnodeinstance.h + positionernodeinstance.cpp positionernodeinstance.h + qmlpropertychangesnodeinstance.cpp qmlpropertychangesnodeinstance.h + qmlstatenodeinstance.cpp qmlstatenodeinstance.h + qmltransitionnodeinstance.cpp qmltransitionnodeinstance.h + qt3dpresentationnodeinstance.cpp qt3dpresentationnodeinstance.h + qt5informationnodeinstanceserver.cpp qt5informationnodeinstanceserver.h + qt5nodeinstanceclientproxy.cpp qt5nodeinstanceclientproxy.h + qt5nodeinstanceserver.cpp qt5nodeinstanceserver.h + qt5previewnodeinstanceserver.cpp qt5previewnodeinstanceserver.h + qt5rendernodeinstanceserver.cpp qt5rendernodeinstanceserver.h + qt5testnodeinstanceserver.cpp qt5testnodeinstanceserver.h + quickitemnodeinstance.cpp quickitemnodeinstance.h + servernodeinstance.cpp servernodeinstance.h ) -extend_target(qml2puppet "${SRCDIR}/types" - enumeration.cpp enumeration.h +extend_qtc_executable(qml2puppet + SOURCES_PREFIX "${SRCDIR}/types" + SOURCES + enumeration.cpp enumeration.h ) -extend_target(qml2puppet "${SRCDIR}/qmlprivategate" - designersupportdelegate.h - qmlprivategate_56.cpp qmlprivategate.h +extend_qtc_executable(qml2puppet + SOURCES_PREFIX "${SRCDIR}/qmlprivategate" + SOURCES + designersupportdelegate.h + qmlprivategate_56.cpp qmlprivategate.h ) diff --git a/src/tools/qtpromaker/CMakeLists.txt b/src/tools/qtpromaker/CMakeLists.txt index 70907c3d7c..5c81cdcd6b 100644 --- a/src/tools/qtpromaker/CMakeLists.txt +++ b/src/tools/qtpromaker/CMakeLists.txt @@ -1,2 +1 @@ add_qtc_executable(qtpromaker DEPENDS Qt5::Core SOURCES main.cpp) -install(TARGETS qtpromaker DESTINATION "${IDE_LIBEXEC_PATH}") |