ViewSolutions/Examples/CMakeLists.txt

40 lines
1009 B
CMake
Raw Normal View History

2020-04-29 21:26:46 +03:00
#
# Copyright (C) 2018-2020 QuasarApp.
# Distributed under the lgplv3 software license, see the accompanying
# Everyone is permitted to copy and distribute verbatim copies
# of this license document, but changing it is not allowed.
#
cmake_minimum_required(VERSION 3.5)
project(ViewSolutionsExamples LANGUAGES CXX)
include(../ViewSolutions/CMake/ProjectOut.cmake)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(Qt5 COMPONENTS Core REQUIRED)
file(GLOB SOURCE_CPP
"src/*.cpp"
"src/*.qrc"
)
2020-05-10 01:05:31 +03:00
if(ANDROID)
add_library(${PROJECT_NAME} SHARED ${SOURCE_CPP})
else()
add_executable(${PROJECT_NAME} ${SOURCE_CPP})
endif()
target_compile_definitions(${PROJECT_NAME}
PRIVATE $<$<OR:$<CONFIG:Debug>,$<CONFIG:RelWithDebInfo>>:QT_QML_DEBUG>)
2020-04-29 21:26:46 +03:00
target_link_libraries(${PROJECT_NAME} PRIVATE ViewSolutions)
target_include_directories(${PROJECT_NAME} PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/src")