-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists_x64.txt
45 lines (36 loc) · 1.19 KB
/
CMakeLists_x64.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
# CMakeLists_x64.txt
set(MINHOOK_SOURCES
${CMAKE_SOURCE_DIR}/minhook/src/hook.c
${CMAKE_SOURCE_DIR}/minhook/src/buffer.c
${CMAKE_SOURCE_DIR}/minhook/src/trampoline.c
${CMAKE_SOURCE_DIR}/minhook/src/hde/hde32.c
${CMAKE_SOURCE_DIR}/minhook/src/hde/hde64.c
)
# Set source files
set(MAIN_SOURCES
${CMAKE_SOURCE_DIR}/src/dllmain.cpp
${MINHOOK_SOURCES}
)
# Specify include directories
include_directories(
${CMAKE_SOURCE_DIR}/minhook/include
${CMAKE_SOURCE_DIR}/minhook/include/src
${CMAKE_SOURCE_DIR}/minhook/include/src/hde
)
# Set C++ standard
set(CMAKE_CXX_STANDARD 17)
# Add the -g option for debugging information
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -DUNICODE -D_UNICODE")
add_library(cursorlock_x64 SHARED
${MAIN_SOURCES}
)
# Include directories for your project
target_include_directories(cursorlock_x64 PRIVATE ${CMAKE_SOURCE_DIR}/include)
target_link_libraries(cursorlock_x64 PRIVATE
mingw32
)
# Rename the generated dll to have the .asi extension
add_custom_command(
TARGET cursorlock_x64 POST_BUILD
COMMAND ${CMAKE_COMMAND} -E rename ${CMAKE_CURRENT_BINARY_DIR}/libcursorlock_x64.dll ${CMAKE_CURRENT_BINARY_DIR}/libcursorlock_x64.asi
)