From 93cf929f29dea490ed60e5300cacdd99886c988e Mon Sep 17 00:00:00 2001 From: Chris Xiong Date: Sat, 9 Sep 2023 20:09:50 -0400 Subject: Add the standalone portion of mapman. --- mapman/CMakeLists.txt | 52 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 mapman/CMakeLists.txt (limited to 'mapman/CMakeLists.txt') diff --git a/mapman/CMakeLists.txt b/mapman/CMakeLists.txt new file mode 100644 index 0000000..99f1d67 --- /dev/null +++ b/mapman/CMakeLists.txt @@ -0,0 +1,52 @@ +cmake_minimum_required(VERSION 3.14.0) +project(mapman CXX) +set(CMAKE_CXX_STANDARD 17) +set(CMAKE_CXX_STANDARD_REQUIRED ON) +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +option(USE_QT6 "Build with Qt 6" OFF) +if (USE_QT6) + find_package(Qt6 REQUIRED COMPONENTS Widgets) +else() + find_package(Qt5 REQUIRED COMPONENTS Widgets) +endif() + +find_package(ZLIB REQUIRED) +find_package(SQLite3 REQUIRED) +include_directories(${ZLIB_INCLUDE_DIRS}) +include_directories(${SQLite3_INCLUDE_DIRS}) + +INCLUDE (CheckTypeSize) + +SET(CMAKE_EXTRA_INCLUDE_FILES "filesystem") +check_type_size("std::filesystem::path::value_type" PATH_VALSIZE LANGUAGE CXX) +SET(CMAKE_EXTRA_INCLUDE_FILES) + +add_compile_definitions(PATH_VALSIZE=${PATH_VALSIZE}) + +set(CMAKE_AUTOMOC ON) +set(CMAKE_AUTORCC ON) +set(CMAKE_AUTOUIC ON) + +set(mapman_SOURCES + src/main.cpp + src/mapdump.cpp + src/utils.cpp + src/library.cpp + src/painter.cpp + src/sliceview.cpp + src/groupview.cpp + src/diffview.cpp + src/mainwindow.cpp +) +add_executable(mapman ${mapman_SOURCES}) + +target_link_libraries(mapman + ${ZLIB_LIBRARIES} +) + +if (USE_QT6) + target_link_libraries(mapman Qt6::Widgets ${SQLite3_LIBRARIES}) +else() + target_link_libraries(mapman Qt5::Widgets ${SQLite3_LIBRARIES}) +endif() -- cgit v1.2.3