-
Notifications
You must be signed in to change notification settings - Fork 13
/
CMakeLists.txt
46 lines (40 loc) · 1.13 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
cmake_minimum_required(VERSION 3.25)
project(reframework-d2d)
include (cmake/CPM.cmake)
CPMAddPackage("gh:nemtrif/[email protected]")
CPMAddPackage("gh:ThePhD/[email protected]")
CPMAddPackage(
NAME lua
GITHUB_REPOSITORY lua/lua
VERSION 5.4.6
DOWNLOAD_ONLY YES
)
if (lua_ADDED)
FILE(GLOB lua_sources ${lua_SOURCE_DIR}/*.c)
list(REMOVE_ITEM lua_sources "${lua_SOURCE_DIR}/lua.c" "${lua_SOURCE_DIR}/luac.c" "${lua_SOURCE_DIR}/onelua.c")
add_library(lua STATIC ${lua_sources})
target_include_directories(lua
PUBLIC
$<BUILD_INTERFACE:${lua_SOURCE_DIR}>
)
endif()
add_library(reframework-d2d SHARED
src/D2DFont.cpp
src/D2DImage.cpp
src/D2DPainter.cpp
src/D3D12Renderer.cpp
src/DrawList.cpp
src/Plugin.cpp
src/D3D12CommandContext.cpp
)
target_include_directories(reframework-d2d PRIVATE
src
deps/reframework/include
)
target_compile_features(reframework-d2d PRIVATE cxx_std_20)
target_link_libraries(reframework-d2d PRIVATE utf8cpp sol2::sol2 lua d2d1 dwrite d3d11 d3d12 dxgi d3dcompiler)
install(
TARGETS reframework-d2d
DESTINATION bin
COMPONENT reframework-d2d
)