-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
47 lines (37 loc) · 1.26 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
cmake_minimum_required(VERSION 3.15)
project(ICEmu LANGUAGES CXX)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
# Build the libraries
#execute_process(COMMAND bash "-c" ${CMAKE_SOURCE_DIR}/"setup-lib.sh")
#Include Unicorn
include_directories(${CMAKE_SOURCE_DIR}/lib/unicorn/include)
link_directories(${CMAKE_SOURCE_DIR}/lib/unicorn/build)
#Include Capstone
include_directories(${CMAKE_SOURCE_DIR}/lib/capstone/include)
link_directories(${CMAKE_SOURCE_DIR}/lib/capstone)
#Include ElfIO
include_directories(${CMAKE_SOURCE_DIR}/lib/ELFIO)
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Debug CACHE STRING
#"Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel."
"Choose the type of build, options are: Debug Release - Defaulting to: Debug"
FORCE
)
message("Defaulting build type to: ${CMAKE_BUILD_TYPE}")
else()
message("Build type: ${CMAKE_BUILD_TYPE}")
endif()
# ICEmu sources
add_subdirectory(src/icemu)
# Build the plugins
include(ExternalProject)
ExternalProject_Add(plugins
EXCLUDE_FROM_ALL false
DEPENDS ICEmu
SOURCE_DIR ${CMAKE_SOURCE_DIR}/plugins
BINARY_DIR ${CMAKE_SOURCE_DIR}/plugins/build
CONFIGURE_COMMAND ${CMAKE_COMMAND} ../
#BUILD_COMMAND "make"
BUILD_ALWAYS true
INSTALL_COMMAND ""
)