-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
62 lines (52 loc) · 1.72 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.24)
set(CMAKE_TOOLCHAIN_FILE "$ENV{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake"
CACHE STRING "Vcpkg toolchain file")
message(STATUS ${CMAKE_TOOLCHAIN_FILE})
project(demo)
set(CMAKE_CXX_STANDARD 17)
find_package(GLEW REQUIRED)
find_package(glfw3 REQUIRED)
find_package(Stb REQUIRED)
find_package(glm REQUIRED)
find_package(assimp REQUIRED)
# lib_cef_dll_wrapper
# set(CEF_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/lib/cef")
# list(APPEND CMAKE_MODULE_PATH "${CEF_ROOT}/cmake")
# find_package(CEF REQUIRED)
# add_subdirectory(./lib/cef/libcef_dll)
message(STATUS )
add_executable(demo)
target_sources(demo PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/src/main.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/win/application.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/win/window.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/gl/glbase.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/gl/mesh.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/gl/program.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/gl/pipeline.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/gl/image.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/gl/texture.cpp
# ${CMAKE_CURRENT_SOURCE_DIR}/src/gl/huigl.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/util.cpp
)
# set(CEF_TARGET libcef_dll_wrapper)
target_link_libraries(demo PUBLIC
glfw
GLEW::GLEW
assimp::assimp
)
target_include_directories(demo PUBLIC
# ${CEF_ROOT}
${CMAKE_CURRENT_SOURCE_DIR}/include
glfw
GLEW::GLEW
${Stb_INCLUDE_DIR}
glm::glm-header-only
assimp::assimp
)
list(APPEND move_dirs glsl image)
foreach(dir IN LISTS move_dirs)
file(REMOVE ${CMAKE_BINARY_DIR}/${dir})
file(COPY ${dir} DESTINATION ${CMAKE_BINARY_DIR})
endforeach()
# configure_file("glsl/vertex.glsl" ${CMAKE_BINARY_DIR}/vertex.glsl COPYONLY)