-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
72 lines (60 loc) · 1.98 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
cmake_minimum_required(VERSION 3.16)
project(eidolist VERSION 0.1 LANGUAGES CXX)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
find_package(QT NAMES Qt6 REQUIRED COMPONENTS Widgets)
find_package(Qt6 REQUIRED COMPONENTS Widgets)
option(USE_SYSTEM_LIBLCF "Use system install of liblcf" OFF)
if(USE_SYSTEM_LIBLCF)
find_package(liblcf REQUIRED)
else(USE_SYSTEM_LIBLCF)
function(add_liblcf)
set(BUILD_SHARED_LIBS OFF)
set(LIBLCF_ENABLE_INSTALL OFF)
add_subdirectory(${CMAKE_SOURCE_DIR}/third_party/liblcf)
endfunction()
add_liblcf()
endif(USE_SYSTEM_LIBLCF)
set(PROJECT_SOURCES
src/main.cpp
src/directorydialog.cpp
src/directorydialog.h
src/directorydialog.ui
)
qt_add_executable(eidolist
MANUAL_FINALIZATION
${PROJECT_SOURCES}
eidolist.qrc
src/diffs.h
src/dialogs/filemerge_dialog.h src/dialogs/filemerge_dialog.cpp src/dialogs/filemerge_dialog.ui
src/dialogs/mapinfodiff_dialog.h src/dialogs/mapinfodiff_dialog.cpp src/dialogs/mapinfodiff_dialog.ui
src/databaseholder.h src/databaseholder.cpp
src/ce_diff.h src/ce_diff.cpp
src/map_diff.h
src/map_diff.cpp
src/write_changelog.h src/write_changelog.cpp
src/changelog_parse.cpp
src/changelog_parse.h
src/merger_base.h
)
target_link_libraries(eidolist PRIVATE Qt6::Widgets)
target_link_libraries(eidolist PRIVATE lcf)
set_target_properties(eidolist PROPERTIES
${BUNDLE_ID_OPTION}
MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION}
MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
MACOSX_BUNDLE TRUE
WIN32_EXECUTABLE TRUE
)
include(GNUInstallDirs)
install(TARGETS eidolist
BUNDLE DESTINATION .
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)
if(QT_VERSION_MAJOR EQUAL 6)
qt_finalize_executable(eidolist)
endif()