You've already forked Shipwright
mirror of
https://github.com/CraftyBoss/Shipwright.git
synced 2026-07-14 05:07:46 -07:00
[cmake] Use SDL2, GLEW and GLFW from vcpkg (Windows) (#1194)
This commit is contained in:
+2
-2
@@ -18,13 +18,13 @@ set_property(DIRECTORY ${CMAKE_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT soh)
|
||||
add_compile_options($<$<CXX_COMPILER_ID:MSVC>:/MP>)
|
||||
|
||||
if (CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
||||
include(cmake/automate-vcpkg.cmake)
|
||||
include(CMake/automate-vcpkg.cmake)
|
||||
|
||||
set(VCPKG_TRIPLET x64-windows-static)
|
||||
set(VCPKG_TARGET_TRIPLET x64-windows-static)
|
||||
|
||||
vcpkg_bootstrap()
|
||||
vcpkg_install_packages(zlib bzip2 libpng)
|
||||
vcpkg_install_packages(zlib bzip2 libpng SDL2 GLEW glfw3)
|
||||
endif()
|
||||
|
||||
################################################################################
|
||||
|
||||
@@ -471,7 +471,6 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
||||
"_CRT_SECURE_NO_WARNINGS;"
|
||||
"ENABLE_DX11;"
|
||||
"ENABLE_OPENGL;"
|
||||
"%(PreprocessorDefinitions)GLEW_STATIC;"
|
||||
"UNICODE;"
|
||||
"_UNICODE"
|
||||
STORMLIB_NO_AUTO_LINK
|
||||
@@ -490,7 +489,6 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
||||
"_CRT_SECURE_NO_WARNINGS;"
|
||||
"ENABLE_OPENGL;"
|
||||
"ENABLE_DX11;"
|
||||
"%(PreprocessorDefinitions)GLEW_STATIC;"
|
||||
"UNICODE;"
|
||||
"_UNICODE"
|
||||
STORMLIB_NO_AUTO_LINK
|
||||
@@ -551,8 +549,10 @@ if (NOT CMAKE_SYSTEM_NAME MATCHES "Windows|NintendoSwitch|CafeOS")
|
||||
elseif (CMAKE_SYSTEM_NAME MATCHES "NintendoSwitch|CafeOS")
|
||||
find_package(SDL2)
|
||||
else()
|
||||
set(GLEW-INCLUDE ${CMAKE_CURRENT_SOURCE_DIR}/Lib/GLEW/)
|
||||
set(SDL2-INCLUDE ${CMAKE_CURRENT_SOURCE_DIR}/Lib/SDL/)
|
||||
find_package(SDL2)
|
||||
find_package(GLEW)
|
||||
set(GLEW-INCLUDE ${GLEW_INCLUDE_DIRS})
|
||||
set(SDL2-INCLUDE ${SDL2_INCLUDE_DIRS})
|
||||
endif()
|
||||
|
||||
target_include_directories(${PROJECT_NAME} PRIVATE
|
||||
@@ -655,13 +655,13 @@ endif()
|
||||
if (CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
||||
if("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x64")
|
||||
target_link_libraries(${PROJECT_NAME}
|
||||
"glew32s;"
|
||||
"GLEW::GLEW;"
|
||||
"opengl32;"
|
||||
"storm;"
|
||||
)
|
||||
elseif("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "Win32")
|
||||
target_link_libraries(${PROJECT_NAME}
|
||||
"glew32s;"
|
||||
"GLEW::GLEW;"
|
||||
"opengl32;"
|
||||
"storm;"
|
||||
)
|
||||
@@ -710,19 +710,3 @@ else()
|
||||
storm
|
||||
)
|
||||
endif()
|
||||
|
||||
if (CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
||||
if("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x64")
|
||||
add_library(glew32s STATIC IMPORTED )
|
||||
set_property(TARGET glew32s PROPERTY
|
||||
IMPORTED_LOCATION ${CMAKE_CURRENT_SOURCE_DIR}/Lib/GLEW/x64/glew32s.lib )
|
||||
set_property(TARGET glew32s PROPERTY
|
||||
IMPORTED_IMPLIB ${CMAKE_CURRENT_SOURCE_DIR}/Lib/GLEW/x64/glew32s.lib)
|
||||
elseif("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "Win32")
|
||||
add_library(glew32s STATIC IMPORTED )
|
||||
set_property(TARGET glew32s PROPERTY
|
||||
IMPORTED_LOCATION ${CMAKE_CURRENT_SOURCE_DIR}/Lib/GLEW/x86/glew32s.lib )
|
||||
set_property(TARGET glew32s PROPERTY
|
||||
IMPORTED_IMPLIB ${CMAKE_CURRENT_SOURCE_DIR}/Lib/GLEW/x86/glew32s.lib)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,60 +0,0 @@
|
||||
//========================================================================
|
||||
// GLFW 3.3 - www.glfw.org
|
||||
//------------------------------------------------------------------------
|
||||
// Copyright (c) 2010-2016 Camilla Löwy <elmindreda@glfw.org>
|
||||
//
|
||||
// This software is provided 'as-is', without any express or implied
|
||||
// warranty. In no event will the authors be held liable for any damages
|
||||
// arising from the use of this software.
|
||||
//
|
||||
// Permission is granted to anyone to use this software for any purpose,
|
||||
// including commercial applications, and to alter it and redistribute it
|
||||
// freely, subject to the following restrictions:
|
||||
//
|
||||
// 1. The origin of this software must not be misrepresented; you must not
|
||||
// claim that you wrote the original software. If you use this software
|
||||
// in a product, an acknowledgment in the product documentation would
|
||||
// be appreciated but is not required.
|
||||
//
|
||||
// 2. Altered source versions must be plainly marked as such, and must not
|
||||
// be misrepresented as being the original software.
|
||||
//
|
||||
// 3. This notice may not be removed or altered from any source
|
||||
// distribution.
|
||||
//
|
||||
//========================================================================
|
||||
// As glfw_config.h.in, this file is used by CMake to produce the
|
||||
// glfw_config.h configuration header file. If you are adding a feature
|
||||
// requiring conditional compilation, this is where to add the macro.
|
||||
//========================================================================
|
||||
// As glfw_config.h, this file defines compile-time option macros for a
|
||||
// specific platform and development environment. If you are using the
|
||||
// GLFW CMake files, modify glfw_config.h.in instead of this file. If you
|
||||
// are using your own build system, make this file define the appropriate
|
||||
// macros in whatever way is suitable.
|
||||
//========================================================================
|
||||
|
||||
// Define this to 1 if building GLFW for X11
|
||||
/* #undef _GLFW_X11 */
|
||||
// Define this to 1 if building GLFW for Win32
|
||||
#define _GLFW_WIN32
|
||||
// Define this to 1 if building GLFW for Cocoa
|
||||
/* #undef _GLFW_COCOA */
|
||||
// Define this to 1 if building GLFW for Wayland
|
||||
/* #undef _GLFW_WAYLAND */
|
||||
// Define this to 1 if building GLFW for OSMesa
|
||||
/* #undef _GLFW_OSMESA */
|
||||
|
||||
// Define this to 1 if building as a shared library / dynamic library / DLL
|
||||
#define _GLFW_BUILD_DLL
|
||||
// Define this to 1 to use Vulkan loader linked statically into application
|
||||
/* #undef _GLFW_VULKAN_STATIC */
|
||||
|
||||
// Define this to 1 to force use of high-performance GPU on hybrid systems
|
||||
/* #undef _GLFW_USE_HYBRID_HPG */
|
||||
|
||||
// Define this to 1 if xkbcommon supports the compose key
|
||||
/* #undef HAVE_XKBCOMMON_COMPOSE_H */
|
||||
// Define this to 1 if the libc supports memfd_create()
|
||||
/* #undef HAVE_MEMFD_CREATE */
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,16 +0,0 @@
|
||||
|
||||
Bugs are now managed in the SDL issue tracker, here:
|
||||
|
||||
https://github.com/libsdl-org/SDL/issues
|
||||
|
||||
You may report bugs there, and search to see if a given issue has already
|
||||
been reported, discussed, and maybe even fixed.
|
||||
|
||||
|
||||
You may also find help at the SDL forums/mailing list:
|
||||
|
||||
https://discourse.libsdl.org/
|
||||
|
||||
Bug reports are welcome here, but we really appreciate if you use the issue
|
||||
tracker, as bugs discussed on the mailing list may be forgotten or missed.
|
||||
|
||||
@@ -1,20 +0,0 @@
|
||||
|
||||
Simple DirectMedia Layer
|
||||
Copyright (C) 1997-2020 Sam Lantinga <slouken@libsdl.org>
|
||||
|
||||
This software is provided 'as-is', without any express or implied
|
||||
warranty. In no event will the authors be held liable for any damages
|
||||
arising from the use of this software.
|
||||
|
||||
Permission is granted to anyone to use this software for any purpose,
|
||||
including commercial applications, and to alter it and redistribute it
|
||||
freely, subject to the following restrictions:
|
||||
|
||||
1. The origin of this software must not be misrepresented; you must not
|
||||
claim that you wrote the original software. If you use this software
|
||||
in a product, an acknowledgment in the product documentation would be
|
||||
appreciated but is not required.
|
||||
2. Altered source versions must be plainly marked as such, and must not be
|
||||
misrepresented as being the original software.
|
||||
3. This notice may not be removed or altered from any source distribution.
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user