This repository has been archived by the owner on Dec 22, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
62 lines (57 loc) · 1.44 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
57
58
59
60
61
62
cmake_minimum_required(VERSION 3.26)
set(CMAKE_CXX_STANDARD 23)
set(CMAKE_CXX_COMPILER_WORKS 1)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP /EHsc")
include(FetchContent)
# Safetyhook
set(SAFETYHOOK_FETCH_ZYDIS ON)
include(FetchContent)
FetchContent_Declare(
safetyhook
GIT_REPOSITORY "https://github.com/cursey/safetyhook.git"
GIT_TAG "origin/main"
)
FetchContent_MakeAvailable(safetyhook)
# OpenXR
FetchContent_Declare(
openxr
GIT_REPOSITORY "https://github.com/KhronosGroup/OpenXR-SDK"
GIT_TAG "origin/main"
)
FetchContent_MakeAvailable(openxr)
# BF2VR
project(BF2VR)
add_library(
BF2VR MODULE
"src/BF2VR/main.cpp"
"src/BF2VR/Engine/BF2Service.cpp"
"src/BF2VR/Rendering/D3DService.cpp"
"src/BF2VR/Utils/Logging.cpp"
"src/BF2VR/VR/ActionsService.cpp"
"src/BF2VR/VR/OpenXRService.cpp"
)
target_include_directories(
BF2VR PRIVATE
"src/BF2VR"
"src/BF2VR/Engine"
"src/BF2VR/Rendering"
"src/BF2VR/Utils"
"src/BF2VR/VR"
"${OPENXR_SOURCE_DIR}/include"
"${safetyhook_SOURCE_DIR}/include"
)
target_link_libraries(
BF2VR PRIVATE
"openxr_loader"
"safetyhook"
"d3d11"
"d3dcompiler"
)
set_target_properties(BF2VR PROPERTIES PREFIX "")
# Loader
project(Loader)
add_executable(Loader
src/Loader/main.cpp
src/Loader/Loader.rc
)
target_link_libraries(Loader PRIVATE)