diff options
author | Sebastian Holtermann <sebholt@xwmw.org> | 2017-12-08 19:01:48 (GMT) |
---|---|---|
committer | Sebastian Holtermann <sebholt@xwmw.org> | 2017-12-13 12:50:18 (GMT) |
commit | b8ef28ae1f442144f55e23b8defffe01aa350c44 (patch) | |
tree | 7dfb2158fbd85e80f50e31611acceefcd3350a0a /Tests/QtAutogen/ObjectLibrary/CMakeLists.txt | |
parent | 0b6ad59ea6b74379f4aefb42c2402355c393c656 (diff) | |
download | CMake-b8ef28ae1f442144f55e23b8defffe01aa350c44.zip CMake-b8ef28ae1f442144f55e23b8defffe01aa350c44.tar.gz CMake-b8ef28ae1f442144f55e23b8defffe01aa350c44.tar.bz2 |
Autogen: Tests: Separate ObjectLibrary test
Diffstat (limited to 'Tests/QtAutogen/ObjectLibrary/CMakeLists.txt')
-rw-r--r-- | Tests/QtAutogen/ObjectLibrary/CMakeLists.txt | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Tests/QtAutogen/ObjectLibrary/CMakeLists.txt b/Tests/QtAutogen/ObjectLibrary/CMakeLists.txt new file mode 100644 index 0000000..088a24c --- /dev/null +++ b/Tests/QtAutogen/ObjectLibrary/CMakeLists.txt @@ -0,0 +1,18 @@ +cmake_minimum_required(VERSION 3.10) +project(ObjectLibrary) +include("../AutogenTest.cmake") + +set(CMAKE_INCLUDE_CURRENT_DIR ON) +set(CMAKE_AUTOMOC ON) + +# Object library a defined in a subdirectory +add_subdirectory(a) + +# Object library b defined locally +include_directories(b) +add_library(b OBJECT b/classb.cpp) +target_compile_features(b PRIVATE ${QT_COMPILE_FEATURES}) + +# Executable with OBJECT library generator expressions +add_executable(someProgram main.cpp $<TARGET_OBJECTS:a> $<TARGET_OBJECTS:b>) +target_link_libraries(someProgram ${QT_LIBRARIES}) |