diff options
Diffstat (limited to 'Tests/QtAutogen')
-rw-r--r-- | Tests/QtAutogen/RccAutogenBuildDir/CMakeLists.txt | 33 | ||||
-rw-r--r-- | Tests/QtAutogen/RccAutogenBuildDir/lib.cpp | 6 | ||||
-rw-r--r-- | Tests/QtAutogen/RccAutogenBuildDir/lib.h | 6 | ||||
-rw-r--r-- | Tests/QtAutogen/RccAutogenBuildDir/main.cpp | 7 | ||||
-rw-r--r-- | Tests/QtAutogen/RccAutogenBuildDir/resource.qrc | 2 | ||||
-rw-r--r-- | Tests/QtAutogen/Tests.cmake | 1 |
6 files changed, 55 insertions, 0 deletions
diff --git a/Tests/QtAutogen/RccAutogenBuildDir/CMakeLists.txt b/Tests/QtAutogen/RccAutogenBuildDir/CMakeLists.txt new file mode 100644 index 0000000..9bdb689 --- /dev/null +++ b/Tests/QtAutogen/RccAutogenBuildDir/CMakeLists.txt @@ -0,0 +1,33 @@ +cmake_minimum_required(VERSION 3.16) +project(RccAutogenBuildDir) +include("../AutogenCoreTest.cmake") + +set(PROJECTS_ROOT ${CMAKE_BINARY_DIR}) + +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTOUIC ON) +set(CMAKE_AUTORCC ON) + +macro(set_build_type_dependent varName debugValue releaseValue + relWithDebInfoValue minSizeRelValue) + + if(CMAKE_BUILD_TYPE MATCHES Debug) + set(${varName} ${debugValue}) + elseif(CMAKE_BUILD_TYPE MATCHES Release) + set(${varName} ${releaseValue}) + elseif(CMAKE_BUILD_TYPE MATCHES RelWithDebInfo) + set(${varName} ${relWithDebInfoValue}) + elseif(CMAKE_BUILD_TYPE MATCHES MinSizeRel) + set(${varName} ${minSizeRelValue}) + endif() +endmacro() + +set_build_type_dependent(AUTOGEN_DIR agd agr ags agm) +add_library(testlib SHARED lib.h lib.cpp resource.qrc) +set_target_properties(testlib PROPERTIES AUTOGEN_BUILD_DIR "${PROJECTS_ROOT}/${AUTOGEN_DIR}/testlib_ag") +target_link_libraries(testlib ${QT_LIBRARIES}) + +set_build_type_dependent(AUTOGEN_DIR agd agr ags agm) +add_executable(autorcctest main.cpp lib.h) +set_target_properties(autorcctest PROPERTIES AUTOGEN_BUILD_DIR "${PROJECTS_ROOT}/${AUTOGEN_DIR}/autorcctest_ag") +target_link_libraries(autorcctest ${QT_LIBRARIES} testlib) diff --git a/Tests/QtAutogen/RccAutogenBuildDir/lib.cpp b/Tests/QtAutogen/RccAutogenBuildDir/lib.cpp new file mode 100644 index 0000000..3a5c482 --- /dev/null +++ b/Tests/QtAutogen/RccAutogenBuildDir/lib.cpp @@ -0,0 +1,6 @@ +#ifdef _WIN32 +__declspec(dllexport) +#endif + void foo() +{ +} diff --git a/Tests/QtAutogen/RccAutogenBuildDir/lib.h b/Tests/QtAutogen/RccAutogenBuildDir/lib.h new file mode 100644 index 0000000..28138f1 --- /dev/null +++ b/Tests/QtAutogen/RccAutogenBuildDir/lib.h @@ -0,0 +1,6 @@ +#ifndef LIB_H +#define LIB_H + +void foo(); + +#endif diff --git a/Tests/QtAutogen/RccAutogenBuildDir/main.cpp b/Tests/QtAutogen/RccAutogenBuildDir/main.cpp new file mode 100644 index 0000000..a211f40 --- /dev/null +++ b/Tests/QtAutogen/RccAutogenBuildDir/main.cpp @@ -0,0 +1,7 @@ +#include "lib.h" + +int main() +{ + foo(); + return 0; +} diff --git a/Tests/QtAutogen/RccAutogenBuildDir/resource.qrc b/Tests/QtAutogen/RccAutogenBuildDir/resource.qrc new file mode 100644 index 0000000..90f4a83 --- /dev/null +++ b/Tests/QtAutogen/RccAutogenBuildDir/resource.qrc @@ -0,0 +1,2 @@ +<!DOCTYPE RCC> +<RCC version="1.0"/> diff --git a/Tests/QtAutogen/Tests.cmake b/Tests/QtAutogen/Tests.cmake index 412d511..8a77954 100644 --- a/Tests/QtAutogen/Tests.cmake +++ b/Tests/QtAutogen/Tests.cmake @@ -17,6 +17,7 @@ ADD_AUTOGEN_TEST(Parallel2 parallel2) ADD_AUTOGEN_TEST(Parallel3 parallel3) ADD_AUTOGEN_TEST(Parallel4 parallel4) ADD_AUTOGEN_TEST(ParallelAUTO parallelAUTO) +ADD_AUTOGEN_TEST(RccAutogenBuildDir) ADD_AUTOGEN_TEST(RccEmpty rccEmpty) ADD_AUTOGEN_TEST(RccOffMocLibrary) ADD_AUTOGEN_TEST(RccOnly rccOnly) |