SuthbyOpenGLDevPack/CMakeLists.txt

66 lines
2.1 KiB
CMake
Raw Permalink Normal View History

2024-05-14 19:10:03 +08:00
cmake_minimum_required(VERSION 3.5)
project(jungle)
##test target##
file(GLOB JUNGLE_SOURCE ./src/*/*.cpp)
add_executable(jungle ${JUNGLE_SOURCE})
target_include_directories(jungle PRIVATE ./inc/)
##glad dep##
target_include_directories(jungle PRIVATE ./deps/glad/include/)
target_sources(jungle PRIVATE ./deps/glad/src/glad.c)
##glfw dep##
add_subdirectory(./deps/glfw/)
add_dependencies(jungle glfw)
target_include_directories(jungle PRIVATE ./deps/glfw/include/)
target_link_libraries(jungle glfw)
##bullet dep##
FILE(STRINGS "./deps/bullet3/VERSION" BULLET_VERSION)
set(BUILD_BULLET3 ON)
include_directories(./deps/bullet3/src/)
add_subdirectory(./deps/bullet3/src/)
add_dependencies(jungle Bullet3Common)
#target_include_directories(jungle PRIVATE ./deps/bullet3/src/)
target_link_libraries(jungle Bullet3Common)
##glm dep##
add_subdirectory(./deps/glm)
add_dependencies(jungle glm)
target_include_directories(jungle PRIVATE ./deps/glm/)
target_link_libraries(jungle glm)
##stb dep##
target_include_directories(jungle PRIVATE ./deps/stb/)
##imgui dep##
target_include_directories(jungle PRIVATE ./deps/imgui/ PRIVATE ./deps/imgui/backends/)
target_sources(jungle
PRIVATE ./deps/imgui/imgui.cpp
PRIVATE ./deps/imgui/imgui_draw.cpp
PRIVATE ./deps/imgui/imgui_widgets.cpp
PRIVATE ./deps/imgui/imgui_tables.cpp
PRIVATE ./deps/imgui/backends/imgui_impl_glfw.cpp
PRIVATE ./deps/imgui/backends/imgui_impl_opengl3.cpp)
##openal dep##
add_subdirectory(./deps/openal-soft/)
add_dependencies(jungle OpenAL)
target_include_directories(jungle PRIVATE ./deps/openal-soft/include/)
target_link_libraries(jungle OpenAL)
##opencl dep##
#set(BUILD_TESTING OFF)
#set(BUILD_DOCS OFF)
#set(BUILD_EXAMPLES OFF)
#set(BUILD_TESTS OFF)
#set(OPENCL_SDK_BUILD_SAMPLES OFF)
#set(OPENCL_SDK_TEST_SAMPLES OFF)
#set(OPENCL_SDK_BUILD_UTILITY_LIBRARIES ON)
#add_subdirectory(./deps/OpenCL-SDK/)
#message("debug-----------------------------------")
#add_dependencies(jungle OpenCL::OpenCL)
#target_include_directories(jungle PRIVATE ./deps/OpenCL-SDK/lib/include/)
#target_link_libraries(jungle OpenCL::OpenCL)