quake-tools/CMakeLists.txt

66 lines
1.4 KiB
CMake

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_DISABLE_DEPRECATED_BEFORE=0x051300
-DQT_NO_CAST_FROM_ASCII
-DQT_NO_CAST_TO_ASCII
-DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT
-DQT_NO_URL_CAST_FROM_STRING
-DQT_STRICT_ITERATORS)
endmacro()
find_package(
Qt5 5.13.0
CONFIG
REQUIRED
COMPONENTS Core Widgets Gui)
add_executable(
quam WIN32
source/common.h
source/quam/archive.cc
source/quam/archive.h
source/quam/main.cc
source/quam/main_window.cc
source/quam/main_window.h
source/quam/main_window.ui
source/quam/pack.cc
source/quam/pack.h
source/quam/project.cc
source/quam/project.h
source/quam/project.ui
source/quam/wad2.cc
source/quam/wad2.h)
make_qt_project(quam)
install(TARGETS quam)
## EOF