aboutsummaryrefslogtreecommitdiff
path: root/mapman/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'mapman/CMakeLists.txt')
-rw-r--r--mapman/CMakeLists.txt52
1 files changed, 52 insertions, 0 deletions
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()