-
-
Notifications
You must be signed in to change notification settings - Fork 82
/
Copy pathCMakeLists.txt
executable file
·72 lines (58 loc) · 2.16 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.10)
project(nfd VERSION 0.10 LANGUAGES CXX)
include_guard(DIRECTORY)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
file(MAKE_DIRECTORY ../release)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ../release)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ../release)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ../release)
find_package(QT NAMES Qt5 COMPONENTS Widgets REQUIRED)
find_package(Qt5 COMPONENTS Widgets REQUIRED)
find_package(Qt5 COMPONENTS Concurrent REQUIRED)
add_definitions(-DUSE_DEX)
add_definitions(-DUSE_PDF)
add_definitions(-DUSE_ARCHIVE)
include(${PROJECT_SOURCE_DIR}/../nfd_widget/nfd_widget.cmake)
include(${PROJECT_SOURCE_DIR}/../XOptions/xoptionswidget.cmake)
include(${PROJECT_SOURCE_DIR}/../XAboutWidget/xaboutwidget.cmake)
set(PROJECT_SOURCES
${NFD_WIDGET_SOURCES}
${XOPTIONSWIDGET_SOURCES}
${XABOUTWIDGET_SOURCES}
dialogabout.cpp
dialogabout.ui
dialogoptions.cpp
dialogoptions.ui
guimainwindow.cpp
guimainwindow.ui
main_gui.cpp
resources.qrc
)
if(APPLE)
add_library(${PROJECT_NAME} MODULE ${PROJECT_SOURCES})
set_target_properties(${PROJECT_NAME} PROPERTIES
MACOSX_BUNDLE_GUI_IDENTIFIER ntinfo.nfd
MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION}
MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
BUNDLE TRUE)
set(MACOSX_BUNDLE_ICON_FILE ../icons/main.icns)
else()
add_executable(${PROJECT_NAME} WIN32
${PROJECT_SOURCES}
)
endif()
target_link_libraries(${PROJECT_NAME} bzip2)
target_link_libraries(${PROJECT_NAME} lzma)
target_link_libraries(${PROJECT_NAME} zlib)
target_link_libraries(${PROJECT_NAME} capstone_x86)
target_link_libraries(${PROJECT_NAME} Qt5::Widgets)
target_link_libraries(${PROJECT_NAME} Qt5::Concurrent)
if(WIN32)
target_link_libraries(${PROJECT_NAME} Wintrust)
target_link_libraries(${PROJECT_NAME} Crypt32)
endif()