mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
* Remove bundling of openssl1.1 * Remove obsolete compile flags * Remove use of obsolete RimCommandObject * Use QColor::isValidColorName QColor::isValidColor is deprecated in Qt 6.6, QColor::isValidColorName was introduced in 6.4 * Make sure debug DLLs are copied when required * Remove Qt5 from AppFwk * Remove obsolete copy of Qt DLLs
57 lines
1.3 KiB
CMake
57 lines
1.3 KiB
CMake
cmake_minimum_required(VERSION 3.15)
|
|
|
|
project(cafProjectDataModel_UnitTests)
|
|
|
|
find_package(
|
|
Qt6
|
|
COMPONENTS
|
|
REQUIRED Core Widgets
|
|
)
|
|
qt_standard_project_setup()
|
|
|
|
if(MSVC AND (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 19.11))
|
|
# VS 2017 : Disable warnings from from gtest code, using deprecated code
|
|
# related to TR1
|
|
add_definitions(-D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING)
|
|
endif()
|
|
|
|
include_directories(${CMAKE_CURRENT_SOURCE_DIR} # required for gtest-all.cpp
|
|
)
|
|
|
|
set(PROJECT_FILES
|
|
cafPdmBasicTest.cpp
|
|
cafProjectDataModel_UnitTests.cpp
|
|
Child.cpp
|
|
Parent.cpp
|
|
TestObj.cpp
|
|
AggregatedTypesInField.cpp
|
|
gtest/gtest-all.cpp
|
|
)
|
|
|
|
qt_add_executable(${PROJECT_NAME} ${PROJECT_FILES})
|
|
|
|
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
|
target_compile_options(
|
|
cafProjectDataModel_UnitTests PRIVATE -Wno-ambiguous-reversed-operator
|
|
-Wno-invalid-source-encoding
|
|
)
|
|
endif()
|
|
|
|
target_link_libraries(
|
|
${PROJECT_NAME} PRIVATE cafProjectDataModel ${QT_LIBRARIES} ${THREAD_LIBRARY}
|
|
)
|
|
|
|
source_group("" FILES ${PROJECT_FILES})
|
|
|
|
install(
|
|
TARGETS ${PROJECT_NAME}
|
|
BUNDLE DESTINATION .
|
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
|
)
|
|
|
|
qt_generate_deploy_app_script(
|
|
TARGET ${PROJECT_NAME} OUTPUT_SCRIPT deploy_script
|
|
NO_UNSUPPORTED_PLATFORM_ERROR NO_TRANSLATIONS
|
|
)
|
|
install(SCRIPT ${deploy_script})
|