Windows build fixes
This commit is contained in:
parent
3b861fb1d2
commit
5c928b82c9
@ -84,17 +84,19 @@ set(GLFW_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
|
||||
#message(FATAL_ERROR "glfw3.lib not found")
|
||||
#endif()
|
||||
|
||||
find_package(glfw3 REQUIRED)
|
||||
find_package(glfw3 CONFIG REQUIRED)
|
||||
|
||||
# Find GLEW
|
||||
|
||||
# set(GLEW_USE_STATIC_LIBS, true)
|
||||
|
||||
find_package(GLEW REQUIRED)
|
||||
|
||||
if(GLEW_FOUND)
|
||||
set(GLEW_INCLUDE_DIR ${GLEW_INCLUDE_DIRS})
|
||||
get_filename_component(GLEW_LIBRARIES ${GLEW_LIBRARIES} DIRECTORY)
|
||||
#get_filename_component(GLEW_LIBRARIES ${GLEW_LIBRARIES} DIRECTORY)
|
||||
message(STATUS "GLEW_INCLUDE_DIR: ${GLEW_INCLUDE_DIR}")
|
||||
message(STATUS "GLEW_LIBRARIES: ${GLEW_LIBRARIES}")
|
||||
#message(STATUS "GLEW_LIBRARIES: ${GLEW_LIBRARIES}")
|
||||
else()
|
||||
message(FATAL_ERROR "GLEW not found")
|
||||
endif()
|
||||
@ -182,7 +184,12 @@ ${GLEW_INCLUDE_DIR}
|
||||
${GLEW_INCLUDE_DIRS})
|
||||
|
||||
target_link_directories(${PROJECT_NAME} PUBLIC ${GLFW_LIB_DIR} ${GLEW_LIBRARIES} ${ComputeEngine_LIB_DIR} ${ComputeEngine_INCLUDE_DIR})
|
||||
|
||||
if(WIN32)
|
||||
target_link_libraries(${PROJECT_NAME} glfw GLEW::GLEW ComputeEngine)
|
||||
else()
|
||||
target_link_libraries(${PROJECT_NAME} glfw OpenGL::GL GLEW::GLEW ComputeEngine)
|
||||
endif()
|
||||
|
||||
# Copy shaders, assets and configs for binaries to access
|
||||
file(COPY shaders DESTINATION ${CMAKE_BINARY_DIR}/Release)
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 133701c4174c00b869988bdc8b21234dc6d5e718
|
||||
Subproject commit d84a7a93da7c7b6c60ed044f25add70b1cd13352
|
@ -1,8 +1,6 @@
|
||||
@echo off
|
||||
|
||||
set GLFW_ROOT=
|
||||
set GLEW_ROOT=
|
||||
set stb_image_ROOT=
|
||||
set ComputeEngine_ROOT=%CD%/ComputeEngine
|
||||
set vcpkg_ROOT=C:\Desktop\git\vcpkg\scripts\buildsystems\vcpkg.cmake
|
||||
|
||||
cmake --build build --config Release
|
||||
cmake --build build --config Release -DCMAKE_TOOLCHAIN_FILE=%vcpkg_ROOT%
|
@ -1,10 +1,9 @@
|
||||
@echo off
|
||||
|
||||
set GLFW_ROOT=
|
||||
set GLEW_ROOT=
|
||||
set stb_image_ROOT=
|
||||
set ComputeEngine_ROOT=%CD%/ComputeEngine
|
||||
set vcpkg_ROOT=C:\Desktop\git\vcpkg\scripts\buildsystems\vcpkg.cmake
|
||||
|
||||
cmake -B ComputeEngine/build -S ComputeEngine -DGLFW_ROOT=%GLFW_ROOT% -DGLEW_ROOT=%GLEW_ROOT% -Dstb_image_ROOT=%stb_image_ROOT%
|
||||
cmake -B ComputeEngine/build -S ComputeEngine -DCMAKE_TOOLCHAIN_FILE=%vcpkg_ROOT% -DVCPKG_TARGET_TRIPLET=x64-windows-static
|
||||
cmake --build ComputeEngine/build --config Release
|
||||
cmake -B build -S . -DGLFW_ROOT=%GLFW_ROOT% -DGLEW_ROOT=%GLEW_ROOT% -Dstb_image_ROOT=%stb_image_ROOT% -DComputeEngine_ROOT=%ComputeEngine_ROOT%
|
||||
cmake -B build -S . -DCMAKE_TOOLCHAIN_FILE=%vcpkg_ROOT% -DVCPKG_TARGET_TRIPLET=x64-windows-static
|
||||
cmake --build build --config Release
|
Loading…
x
Reference in New Issue
Block a user