-
Notifications
You must be signed in to change notification settings - Fork 26
/
CMakeLists.txt
77 lines (60 loc) · 2.05 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
73
74
75
76
# Source Files
set(SOURCE_FILES
dllmain.cpp
Pools.cpp
WaterBlocks.cpp
MatrixList.cpp
AlphaEntityList.cpp
InVisibleEntityPtrs.cpp
StreamingObjectInstancesList.cpp
TimeModels.cpp
AtomicModels.cpp
DamageAtomicModels.cpp
WeaponModels.cpp
ClumpModels.cpp
VehicleModels.cpp
PedModels.cpp
Coronas.cpp
StaticShadows.cpp
Searchlights.cpp
FrameLimit.cpp
LimitAdjuster.h
utility/dummy_object.hpp
utility/PoolAdjuster.hpp
utility/PoolAdjusterDynamic.hpp
utility/DynamicPool.hpp
utility/LinkListAdjuster.hpp
utility/StaticArrayAdjuster.hpp
utility/PointerAdjuster.hpp
utility/DynamicStore.hpp
utility/StoreAdjuster.hpp
structs/CPool.h
structs/CLinkList.h
)
add_definitions(-DINJECTOR_GVM_HAS_TRANSLATOR)
# The current directory shall be used for #include <file>
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/structs)
# Visual Studio specific stuff
if(MSVC)
set(ASM_EXT "c") # Use C with declspec(naked) instead
# We don't want to deal with Buffer Security Check under "Release" build.
set(CMAKE_CXX_FLAGS_RELEASE "/GS- ${CMAKE_CXX_FLAGS_RELEASE}")
add_definitions(-D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS)
endif(MSVC)
# MiNGW specific stuff
if(MINGW)
# Enable ASM files
enable_language(C CXX ASM)
set(ASM_EXT "s") # GAS Assembly extension
# Compiling C++11 source (with GNU and Microsoft extensions)
set(CMAKE_CXX_FLAGS "-std=gnu++11 ${CMAKE_CXX_FLAGS}")
# Force static runtime
# As you may know Windows DLLs and GNU standard library do not work very well together since the GNU librares have different exception models within the same DLL name, that's real bad.
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -static-libgcc")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static-libgcc -static-libstdc++")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -static")
endif(MINGW)
add_library(limit_adjuster_gta3vcsa SHARED ${SOURCE_FILES})
set_target_properties(limit_adjuster_gta3vcsa PROPERTIES SUFFIX ".asi")
install(TARGETS limit_adjuster_gta3vcsa RUNTIME DESTINATION "./")