blob: 8545a5fffdef71dff0c42e7775598897b5cb753a (
plain)
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
|
remove_definitions (-DNOMINMAX)
add_definitions (
-DUNICODE -D_UNICODE
-DMINGW_HAS_SECURE_API=1
)
if (NOT MSVC)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-comment")
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-enum-compare")
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-pointer-to-int-cast")
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-switch")
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-value")
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-variable")
endif ()
add_convenience_library (mhook
disasm-lib/cpu.c
disasm-lib/disasm.c
disasm-lib/disasm_x86.c
disasm-lib/misc.c
mhook-lib/mhook.cpp
)
add_executable (mhook-test
mhook-test.cpp
)
target_link_libraries (mhook-test
mhook
ws2_32
)
add_test (NAME mhook-test COMMAND $<TARGET_FILE:mhook-test>)
install (
FILES "COPYING"
DESTINATION ${DOC_INSTALL_DIR}
RENAME LICENSE-mhook.txt
)
|