-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
56 lines (48 loc) · 1.52 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
cmake_minimum_required(VERSION 3.14)
project(win32api)
find_package(PkgConfig REQUIRED)
find_package(fmt REQUIRED)
find_package(spdlog REQUIRED)
pkg_check_modules(SDL2 REQUIRED IMPORTED_TARGET sdl2)
set(WIN32_INCLUDE_DIRS
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/advapi32
${CMAKE_CURRENT_SOURCE_DIR}/gdi32
${CMAKE_CURRENT_SOURCE_DIR}/kernel32
${CMAKE_CURRENT_SOURCE_DIR}/rpcrt4
${CMAKE_CURRENT_SOURCE_DIR}/user32)
if(${BUILD_WIN32_STATIC})
add_library(win32api STATIC ${CMAKE_CURRENT_SOURCE_DIR}/lib.cpp)
else()
add_library(win32api SHARED ${CMAKE_CURRENT_SOURCE_DIR}/lib.cpp)
endif()
set_target_properties(win32api PROPERTIES
CXX_VISIBILITY_PRESET hidden)
target_compile_features(win32api
PRIVATE
cxx_std_17)
target_compile_definitions(win32api
PRIVATE
WIN32_EXPORTS
$<$<CONFIG:Debug>:SPDLOG_ACTIVE_LEVEL=SPDLOG_LEVEL_TRACE>)
target_include_directories(win32api
PUBLIC
${WIN32_INCLUDE_DIRS}
PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/common)
target_link_libraries(win32api
PRIVATE
unicode
PkgConfig::SDL2
spdlog::spdlog)
add_subdirectory(rgssad/)
add_subdirectory(advapi32/)
add_subdirectory(common/)
add_subdirectory(gdi32/)
add_subdirectory(gdiplus/)
add_subdirectory(kernel32/)
add_subdirectory(rpcrt4/)
add_subdirectory(user32/)
add_subdirectory(extra/camouse)
add_subdirectory(extra/tktk_bitmap)
add_subdirectory(extra/wfcrypt)