update windows workflow and CMakeLists.txt
This commit is contained in:
+10
-2
@@ -1,4 +1,6 @@
|
||||
option(VOXELENGINE_BUILD_WINDOWS_VCPKG OFF)
|
||||
option(VOXELENGINE_BUILD_STATIC OFF)
|
||||
|
||||
if(VOXELENGINE_BUILD_WINDOWS_VCPKG AND EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/vcpkg/scripts/buildsystems/vcpkg.cmake")
|
||||
set(CMAKE_TOOLCHAIN_FILE "${CMAKE_CURRENT_SOURCE_DIR}/vcpkg/scripts/buildsystems/vcpkg.cmake" CACHE STRING "")
|
||||
endif()
|
||||
@@ -88,6 +90,8 @@ if (NOT APPLE)
|
||||
find_package(EnTT REQUIRED)
|
||||
endif()
|
||||
|
||||
set(ZLIB ZLIB::ZLIB)
|
||||
|
||||
if (WIN32)
|
||||
if(VOXELENGINE_BUILD_WINDOWS_VCPKG)
|
||||
set(LUA_LIBRARIES "${CMAKE_CURRENT_SOURCE_DIR}/vcpkg/packages/luajit_x64-windows/lib/lua51.lib")
|
||||
@@ -96,9 +100,13 @@ if (WIN32)
|
||||
find_package(spng REQUIRED)
|
||||
find_package(glm REQUIRED)
|
||||
find_package(vorbis REQUIRED)
|
||||
set(PNGLIB spng::spng)
|
||||
if(VOXELENGINE_BUILD_STATIC)
|
||||
set(PNGLIB spng::spng_static)
|
||||
set(ZLIB zlibstatic)
|
||||
else()
|
||||
set(PNGLIB spng::spng)
|
||||
endif()
|
||||
set(VORBISLIB Vorbis::vorbis Vorbis::vorbisfile)
|
||||
else()
|
||||
find_package(Lua REQUIRED)
|
||||
set(PNGLIB spng)
|
||||
set(VORBISLIB vorbis vorbisfile) # not tested
|
||||
|
||||
Reference in New Issue
Block a user