-
Notifications
You must be signed in to change notification settings - Fork 39
/
CMakeLists.txt
53 lines (40 loc) · 1.19 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
# Minimum CMake required
cmake_minimum_required(VERSION 3.11)
# Project
project(yagi LANGUAGES CXX VERSION 1.5.0)
# Opions
option(BUILD_TESTS "Build test programs" OFF)
# Config
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
SET(EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin)
SET(LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR}/bin)
if (MSVC)
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MT /WX")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MTd /WX")
endif(MSVC)
# Add cmake folder for
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
# Add ghidra subdir
add_subdirectory(ghidra)
# The IDA plugin
add_subdirectory(yagi)
# Add third party loader
add_subdirectory(loader)
# Tests
if(BUILD_TESTS)
add_subdirectory(tests)
endif(BUILD_TESTS)
# Summary
message(STATUS "Configuration summary")
message(STATUS "Project name : ${PROJECT_NAME}")
message(STATUS "Project version : ${PROJECT_VERSION}")
# CPack part
if(WIN32)
set(CPACK_GENERATOR "WIX")
set(CPACK_WIX_UPGRADE_GUID "3fceb3d1-542b-469d-a5af-7068f95e7a68")
set(CPACK_WIX_UNINSTALL "1")
else()
set(CPACK_SOURCE_GENERATOR "TGZ")
endif()
include(CPack)