From 2bbf66ef982d2e4ca1a076e9a1140f7180021e9a Mon Sep 17 00:00:00 2001 From: dcnieho Date: Sat, 18 Jan 2014 01:57:14 +0000 Subject: [PATCH] Fixed CMake UNIX config when building only "freeglut_static" or only the shared library - was setting a property on "freeglut" while "FREEGLUT_BUILD_SHARED_LIBS" was "OFF" git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1638 7f0cb862-5218-0410-a997-914c9d46530a --- freeglut/freeglut/CMakeLists.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/freeglut/freeglut/CMakeLists.txt b/freeglut/freeglut/CMakeLists.txt index c28492f..a3a4fd6 100644 --- a/freeglut/freeglut/CMakeLists.txt +++ b/freeglut/freeglut/CMakeLists.txt @@ -349,8 +349,12 @@ ELSE() SET(LIBNAME glut) ENDIF() - SET_TARGET_PROPERTIES(freeglut PROPERTIES VERSION 3.9.0 SOVERSION 3 OUTPUT_NAME ${LIBNAME}) - SET_TARGET_PROPERTIES(freeglut_static PROPERTIES OUTPUT_NAME ${LIBNAME}) + IF(FREEGLUT_BUILD_SHARED_LIBS) + SET_TARGET_PROPERTIES(freeglut PROPERTIES VERSION 3.9.0 SOVERSION 3 OUTPUT_NAME ${LIBNAME}) + ENDIF() + IF(FREEGLUT_BUILD_STATIC_LIBS) + SET_TARGET_PROPERTIES(freeglut_static PROPERTIES OUTPUT_NAME ${LIBNAME}) + ENDIF() IF(ANDROID) # Not in CMake toolchain file, because the toolchain # file is called several times and generally doesn't