forked from F8LEFT/SoFixer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
31 lines (24 loc) · 829 Bytes
/
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
cmake_minimum_required(VERSION 3.3)
project(SoFixer)
# =========================================================
# SoFixer options
# =========================================================
set(SO_64 OFF CACHE BOOL "build SoFixer for 64bit target")
if(SO_64)
message("building SoFixer for 64bit target")
add_definitions("-D__SO64__")
set(TARGET_NAME SoFixer64)
else()
message("building SoFixer for 32bit target")
add_definitions("-D__SO32__")
set(TARGET_NAME SoFixer32)
endif()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
if(MINGW)
message("build with mingw")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static -static-libgcc -static-libstdc++")
endif()
set(ROOT_SRC ElfReader.cpp
ElfRebuilder.cpp
ObElfReader.cpp)
add_executable(${TARGET_NAME} ${ROOT_SRC} main.cpp)