chore: use target_compile_features for setting lang standard

This commit is contained in:
Patryk Osmaczko 2022-07-19 16:44:27 +02:00
parent 5a930885b7
commit 63e64c0a93
2 changed files with 7 additions and 6 deletions

3
.gitignore vendored
View File

@ -75,3 +75,6 @@ build-SortFilterProxyModel-*
*.dll
*.exe
# Others
build/
.cache

View File

@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.1)
set(CMAKE_CXX_STANDARD 11)
project(SortFilterProxyModel)
find_package(Qt5 REQUIRED
Core
@ -42,8 +42,6 @@ add_library(SortFilterProxyModel OBJECT
proxyroles/filterrole.cpp
)
target_include_directories(SortFilterProxyModel PUBLIC
${CMAKE_CURRENT_LIST_DIR}
$<TARGET_PROPERTY:Qt5::Core,INTERFACE_INCLUDE_DIRECTORIES>
$<TARGET_PROPERTY:Qt5::Qml,INTERFACE_INCLUDE_DIRECTORIES>
)
target_compile_features(SortFilterProxyModel PUBLIC cxx_std_11)
target_link_libraries(SortFilterProxyModel PRIVATE Qt5::Core Qt5::Qml)
target_include_directories(SortFilterProxyModel PUBLIC .)