From 8009da343127fa3d92ff5d44896236100e142285 Mon Sep 17 00:00:00 2001 From: kervala Date: Wed, 7 Mar 2012 20:47:32 +0100 Subject: [PATCH] Fixed: #1321 Adopt WITH_STATIC_EXTERNAL for Mac OS X --- code/CMakeModules/nel.cmake | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/code/CMakeModules/nel.cmake b/code/CMakeModules/nel.cmake index e512e3787..bd92e743e 100644 --- a/code/CMakeModules/nel.cmake +++ b/code/CMakeModules/nel.cmake @@ -640,13 +640,19 @@ MACRO(SETUP_EXTERNAL) ENDIF(${CMAKE_MAKE_PROGRAM} MATCHES "Common7") ENDIF(MSVC10) ELSE(WIN32) - IF(CMAKE_FIND_LIBRARY_SUFFIXES AND NOT APPLE) + IF(APPLE) IF(WITH_STATIC_EXTERNAL) - SET(CMAKE_FIND_LIBRARY_SUFFIXES ".a") + SET(CMAKE_FIND_LIBRARY_SUFFIXES .a .dylib .so) ELSE(WITH_STATIC_EXTERNAL) - SET(CMAKE_FIND_LIBRARY_SUFFIXES ".so") + SET(CMAKE_FIND_LIBRARY_SUFFIXES .dylib .so .a) ENDIF(WITH_STATIC_EXTERNAL) - ENDIF(CMAKE_FIND_LIBRARY_SUFFIXES AND NOT APPLE) + ELSE(APPLE) + IF(WITH_STATIC_EXTERNAL) + SET(CMAKE_FIND_LIBRARY_SUFFIXES .a .so) + ELSE(WITH_STATIC_EXTERNAL) + SET(CMAKE_FIND_LIBRARY_SUFFIXES .so .a) + ENDIF(WITH_STATIC_EXTERNAL) + ENDIF(APPLE) ENDIF(WIN32) IF(WITH_STLPORT)