mirror of
https://github.com/zhenyan121/Cubed.git
synced 2026-04-09 21:54:09 +08:00
fix: build failed on window
This commit is contained in:
@@ -14,14 +14,20 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${PROJECT_NAME})
|
||||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${PROJECT_NAME})
|
||||
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
|
||||
|
||||
find_package(PkgConfig REQUIRED)
|
||||
|
||||
find_package(OpenGL REQUIRED)
|
||||
if (UNIX AND NOT APPLE)
|
||||
find_package(PkgConfig REQUIRED)
|
||||
pkg_check_modules(EGL REQUIRED egl)
|
||||
pkg_check_modules(Wayland REQUIRED wayland-client wayland-egl)
|
||||
find_package(glfw3 REQUIRED)
|
||||
endif()
|
||||
|
||||
add_library(glad STATIC third_party/glad/src/glad.c)
|
||||
target_include_directories(glad PUBLIC third_party/glad/include)
|
||||
|
||||
include(FetchContent)
|
||||
|
||||
if (WIN32)
|
||||
FetchContent_Declare(
|
||||
glfw
|
||||
@@ -39,12 +45,6 @@ if (WIN32)
|
||||
FetchContent_MakeAvailable(glfw)
|
||||
endif()
|
||||
|
||||
|
||||
add_library(glad STATIC third_party/glad/src/glad.c)
|
||||
target_include_directories(glad PUBLIC third_party/glad/include)
|
||||
|
||||
include(FetchContent)
|
||||
|
||||
FetchContent_Declare(
|
||||
glm
|
||||
GIT_REPOSITORY https://github.com/g-truc/glm.git
|
||||
|
||||
Reference in New Issue
Block a user