summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib/plugin/qpluginloader/theplugin/CMakeLists.txt
blob: 1e7754a167640cc08891e5420d49ac47656e65ef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
qt_internal_add_cmake_library(theplugin
    MODULE
    INSTALL_DIRECTORY "${INSTALL_TESTSDIR}/tst_qpluginloader/bin"
    OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../bin"
    SOURCES
        theplugin.cpp theplugin.h
    PUBLIC_LIBRARIES
        Qt::Core
)
qt_autogen_tools_initial_setup(theplugin)

if (UNIX AND NOT APPLE)
    qt_internal_add_cmake_library(theoldplugin
        MODULE
        INSTALL_DIRECTORY "${INSTALL_TESTSDIR}/tst_qpluginloader/bin"
        OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/../bin"
        SOURCES
            theoldplugin.cpp theoldplugin.h
        PUBLIC_LIBRARIES
            Qt::Core
    )
    qt_autogen_tools_initial_setup(theoldplugin)

    # Force unoptimized builds with debugging information so some "QTMETADATA !"
    # strings appear elsewhere in the binary.
    target_compile_options(theplugin PRIVATE -O0 -g3)
    target_compile_options(theoldplugin PRIVATE -O0 -g3)
endif()