remove glfw dependency

This commit is contained in:
Crypto City 2020-01-13 14:09:29 +00:00
parent be59a1e10a
commit 83f231bfe4
4 changed files with 11 additions and 9 deletions

View File

@ -14,6 +14,8 @@ set (VERSION_PATCH "0")
set (VERSION_BUILD "-beta5") # ie "-beta1", or empty string if release: ""
set (VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}")
include_directories(${CMAKE_BINARY_DIR}/external/urho3d/include/Urho3D/ThirdParty)
#
# This approach to labeling beta versions is in line with Apple's
# inflexible versioning scheme for pre-release beta testing versions,
@ -59,13 +61,13 @@ endif ()
if (UNIX)
set (TB_SYSTEM_DEFAULT LINUX)
set (TB_RENDERER_DEFAULT GL3)
set (TB_BACKEND_DEFAULT GLFW)
set (TB_BACKEND_DEFAULT SDL2)
endif ()
if (WIN32)
set (TB_SYSTEM_DEFAULT WINDOWS)
set (TB_RENDERER_DEFAULT GL3)
set (TB_BACKEND_DEFAULT GLFW)
set (TB_BACKEND_DEFAULT SDL2)
endif ()
if (APPLE)
@ -96,9 +98,11 @@ endif ()
set (TB_BUILD_DEMO NO CACHE STRING "Build Demo application: NO, GLFW, SDL2, or ANDROID")
set_property (CACHE TB_BUILD_DEMO PROPERTY STRINGS NO GLFW SDL2 ANDROID)
set (TB_CLIPBOARD_DEFAULT DUMMY)
if (TRUE)
set (TB_BUILD_GLFW_DEFAULT OFF)
set (TB_BUILD_SDL2_DEFAULT OFF)
set (TB_CLIPBOARD_DEFAULT DUMMY)
set (TB_BACKEND_DEFAULT SDL2)
if (${TB_BUILD_DEMO} STREQUAL GLFW)
set (TB_IMAGE_LOADER_STB ON)
set (TB_BACKEND_DEFAULT GLFW)
@ -110,6 +114,7 @@ elseif (${TB_BUILD_DEMO} STREQUAL ANDROID)
set (TB_IMAGE_LOADER_STB ON)
set (TB_BACKEND_DEFAULT ANDROID)
endif ()
endif ()
# The target system
set (TB_SYSTEM "${TB_SYSTEM_DEFAULT}" CACHE STRING "System type")

View File

@ -71,9 +71,6 @@ set (LOCAL_SRCS
renderers/tb_renderer_batcher.cpp
renderers/tb_renderer_gl.cpp
utf8/utf8.cpp
../../Demo/platform/port_glfw.cpp
../../Demo/platform/glfw_extra_linux.cpp
../../Demo/platform/glfw_extra_win.cpp
)
if (TB_BUILD_DEMO STREQUAL GLFW OR TB_BUILD_DEMO STREQUAL SDL2)
@ -116,7 +113,7 @@ endif (ANDROID)
set_property (TARGET TurboBadgerLib PROPERTY CXX_STANDARD 14)
if (TB_BACKEND STREQUAL SDL2)
target_link_libraries (TurboBadgerLib PUBLIC SDL2-interface)
target_link_libraries (TurboBadgerLib PUBLIC ${CMAKE_BINARY_DIR}/external/urho3d/Source/ThirdParty/SDL/libSDL.a)
endif ()
if (TB_BACKEND STREQUAL GLFW)

View File

@ -12,7 +12,7 @@
#ifdef SDL_FRAMEWORK
#include "SDL2/SDL.h"
#else
#include "SDL.h"
#include "SDL/SDL.h"
#endif
namespace tb {

View File

@ -24,7 +24,7 @@
#ifdef SDL_FRAMEWORK
#include "SDL2/SDL.h"
#else
#include "SDL.h"
#include "SDL/SDL.h"
#endif
#if defined(TB_RUNTIME_DEBUG_INFO)