From 5e24b99214f04c3c043c0b7723b2178a9b8739ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Rombauts?= Date: Fri, 17 Jan 2014 20:09:15 +0100 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" --- 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