From 305c66db311fb9dfd9bee7044469776a0ebc850f Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Mon, 17 Jun 2013 10:25:17 +0200 Subject: [PATCH] Cleanup. --- CMakeLists.txt | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a93a6bcb..1eebc062 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -67,10 +67,14 @@ endif() find_package(Threads REQUIRED) #-------------------------------------------------------------------- -# Enable all warnings on GCC, regardless of OS +# Set GCC-specific flags #-------------------------------------------------------------------- if (CMAKE_COMPILER_IS_GNUCC) add_definitions(-Wall) + + if (UNIX AND BUILD_SHARED_LIBS) + add_definitions(-fvisibility=hidden) + endif() endif() #-------------------------------------------------------------------- @@ -78,9 +82,6 @@ endif() #-------------------------------------------------------------------- if (BUILD_SHARED_LIBS) set(_GLFW_BUILD_DLL 1) - if (UNIX) - add_definitions(-fvisibility=hidden) - endif() endif() #--------------------------------------------------------------------