From 6a6ff075e821ead86da8bbdf952f274b6c74a80b Mon Sep 17 00:00:00 2001 From: LaurentGom Date: Fri, 5 Nov 2010 13:58:29 +0000 Subject: [PATCH] Removed the SFML_DYNAMIC symbol for dynamic builds, added SFML_STATIC for static builds git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1614 4e206d99-4929-0410-ac5d-dfc041789085 --- CMakeLists.txt | 6 +++--- CSFML/include/SFML/Config.h | 1 - CSFML/src/SFML/CMakeLists.txt | 1 + include/SFML/Config.hpp | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6fa4800e..3225366c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -30,9 +30,9 @@ set(BUILD_EXAMPLES FALSE CACHE BOOL "TRUE to build the SFML examples, FALSE to i # add an option for building the API documentation set(BUILD_DOC FALSE CACHE BOOL "TRUE to generate the API documentation, FALSE to ignore it") -# define SFML_DYNAMIC if the build type is set to 'shared' -if(BUILD_SHARED_LIBS) - add_definitions(-DSFML_DYNAMIC) +# define SFML_STATIC if the build type is not set to 'shared' +if(NOT BUILD_SHARED_LIBS) + add_definitions(-DSFML_STATIC) endif() # remove SL security warnings with Visual C++ diff --git a/CSFML/include/SFML/Config.h b/CSFML/include/SFML/Config.h index 250c241e..db3aac78 100644 --- a/CSFML/include/SFML/Config.h +++ b/CSFML/include/SFML/Config.h @@ -62,7 +62,6 @@ //////////////////////////////////////////////////////////// #if defined(CSFML_SYSTEM_WINDOWS) - // Windows platforms #ifdef CSFML_EXPORTS // From DLL side, we must export diff --git a/CSFML/src/SFML/CMakeLists.txt b/CSFML/src/SFML/CMakeLists.txt index fffe5538..615700ab 100644 --- a/CSFML/src/SFML/CMakeLists.txt +++ b/CSFML/src/SFML/CMakeLists.txt @@ -17,6 +17,7 @@ add_definitions(-DCSFML_EXPORTS) # find SFML libraries (C++) if(WINDOWS) set(SFML_STATIC_LIBRARIES TRUE) + add_definitions(-DSFML_STATIC) endif() find_package(SFML 2 COMPONENTS system window network graphics audio REQUIRED) include_directories(${SFML_INCLUDE_DIR}) diff --git a/include/SFML/Config.hpp b/include/SFML/Config.hpp index 1d7deaef..67846da3 100644 --- a/include/SFML/Config.hpp +++ b/include/SFML/Config.hpp @@ -95,7 +95,7 @@ //////////////////////////////////////////////////////////// #if defined(SFML_SYSTEM_WINDOWS) - #ifdef SFML_DYNAMIC + #ifndef SFML_STATIC // Windows platforms #ifdef SFML_EXPORTS