From 8a5fd0c5a45e5b387b08732e44d2f7fd0d27fc15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Camilla=20L=C3=B6wy?= Date: Sun, 15 Dec 2019 09:21:58 +0100 Subject: [PATCH] Replace ad-hoc CMake code with DEFINE_SYMBOL This target property does what we were doing manually. --- CMakeLists.txt | 4 ---- src/CMakeLists.txt | 1 + src/glfw_config.h.in | 2 -- 3 files changed, 1 insertion(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 63d17c1d..1e110288 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 "MSVC" OFF) -if (BUILD_SHARED_LIBS) - set(_GLFW_BUILD_DLL 1) -endif() - if (BUILD_SHARED_LIBS AND UNIX) # On Unix-like systems, shared libraries can use the soname system. set(GLFW_LIB_NAME glfw) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 824fbaef..70978159 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -84,6 +84,7 @@ set_target_properties(glfw PROPERTIES SOVERSION ${GLFW_VERSION_MAJOR} POSITION_INDEPENDENT_CODE ON C_STANDARD 99 + DEFINE_SYMBOL _GLFW_BUILD_DLL FOLDER "GLFW3") target_compile_definitions(glfw PRIVATE _GLFW_USE_CONFIG_H) diff --git a/src/glfw_config.h.in b/src/glfw_config.h.in index 018952d2..f4876da2 100644 --- a/src/glfw_config.h.in +++ b/src/glfw_config.h.in @@ -45,8 +45,6 @@ // Define this to 1 if building GLFW for 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 #cmakedefine _GLFW_VULKAN_STATIC