quake-tools/CMakeLists.txt

56 lines
1.1 KiB
CMake
Raw Normal View History

2019-09-27 00:09:09 -07:00
cmake_minimum_required(VERSION 3.14)
cmake_policy(SET CMP0046 NEW)
cmake_policy(SET CMP0063 NEW)
cmake_policy(SET CMP0071 NEW)
project(agw-quake-tools CXX)
if(NOT MSVC)
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall -Wextra -Werror")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-rtti")
endif()
macro(make_qt_project TARGET_NAME)
target_include_directories(${TARGET_NAME} PUBLIC source)
set_target_properties(
${TARGET_NAME}
PROPERTIES
CXX_STANDARD 17
CXX_STANDARD_REQUIRED ON
AUTOMOC ON
AUTOUIC ON
AUTORCC ON)
target_link_libraries(${TARGET_NAME} Qt5::Core Qt5::Gui Qt5::Widgets)
target_compile_definitions(
${TARGET_NAME}
PUBLIC
-DQT_DEPRECATED_WARNINGS
-DQT_STRICT_ITERATORS
-DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT)
endmacro()
find_package(
Qt5 5.13.0
CONFIG
REQUIRED
COMPONENTS Core Widgets Gui)
add_executable(
quam WIN32
source/common.h
source/quam/main.cc
source/quam/main_window.cc
source/quam/main_window.h
source/quam/main_window.ui
source/quam/pak.cc
source/quam/pak.h)
make_qt_project(quam)
install(TARGETS quam)
## EOF