-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
28 lines (20 loc) · 805 Bytes
/
CMakeLists.txt
File metadata and controls
28 lines (20 loc) · 805 Bytes
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
cmake_minimum_required(VERSION 3.10)
project(JAPI_preload LANGUAGES C CXX)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
add_subdirectory(external/minhook)
# Remove the annoying 'lib' prefix
set(CMAKE_SHARED_LIBRARY_PREFIX "")
add_subdirectory(main_lib)
# Statically link the C++ standard library (for preload DLL only)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static-libstdc++ -static-libgcc")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -static")
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -static")
set(OVERRIDEN_LIB_NAME "dinput8")
add_library(${OVERRIDEN_LIB_NAME} SHARED "dll.def"
src/dllmain.cpp
)
target_include_directories(${OVERRIDEN_LIB_NAME} PRIVATE
src
)