1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2024-11-23 02:38:52 -05:00

Replace ad-hoc CMake code with DEFINE_SYMBOL

This target property does what we were doing manually.
This commit is contained in:
Camilla Löwy 2019-12-15 09:21:58 +01:00
parent a5ed740d9d
commit 8a5fd0c5a4
3 changed files with 1 additions and 6 deletions

View File

@ -37,10 +37,6 @@ cmake_dependent_option(GLFW_USE_WAYLAND "Use Wayland for window creation" OFF
cmake_dependent_option(USE_MSVC_RUNTIME_LIBRARY_DLL "Use MSVC runtime library DLL" ON cmake_dependent_option(USE_MSVC_RUNTIME_LIBRARY_DLL "Use MSVC runtime library DLL" ON
"MSVC" OFF) "MSVC" OFF)
if (BUILD_SHARED_LIBS)
set(_GLFW_BUILD_DLL 1)
endif()
if (BUILD_SHARED_LIBS AND UNIX) if (BUILD_SHARED_LIBS AND UNIX)
# On Unix-like systems, shared libraries can use the soname system. # On Unix-like systems, shared libraries can use the soname system.
set(GLFW_LIB_NAME glfw) set(GLFW_LIB_NAME glfw)

View File

@ -84,6 +84,7 @@ set_target_properties(glfw PROPERTIES
SOVERSION ${GLFW_VERSION_MAJOR} SOVERSION ${GLFW_VERSION_MAJOR}
POSITION_INDEPENDENT_CODE ON POSITION_INDEPENDENT_CODE ON
C_STANDARD 99 C_STANDARD 99
DEFINE_SYMBOL _GLFW_BUILD_DLL
FOLDER "GLFW3") FOLDER "GLFW3")
target_compile_definitions(glfw PRIVATE _GLFW_USE_CONFIG_H) target_compile_definitions(glfw PRIVATE _GLFW_USE_CONFIG_H)

View File

@ -45,8 +45,6 @@
// Define this to 1 if building GLFW for OSMesa // Define this to 1 if building GLFW for OSMesa
#cmakedefine _GLFW_OSMESA #cmakedefine _GLFW_OSMESA
// Define this to 1 if building as a shared library / dynamic library / DLL
#cmakedefine _GLFW_BUILD_DLL
// Define this to 1 to use Vulkan loader linked statically into application // Define this to 1 to use Vulkan loader linked statically into application
#cmakedefine _GLFW_VULKAN_STATIC #cmakedefine _GLFW_VULKAN_STATIC