From 43b274f65cb4e97448eccb0b9b0f11d1e2db72b0 Mon Sep 17 00:00:00 2001 From: Jeongseok Lee Date: Wed, 20 Mar 2019 09:09:56 -0700 Subject: [PATCH] Update comments and fix cmake version check --- CMakeLists.txt | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index bf264de91..6e2c7cd90 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -873,10 +873,26 @@ IF(CYGWIN) SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D_DEBUG") ENDIF() -IF(UNIX AND NOT WIN32 AND NOT APPLE) - IF(CMAKE_SIZEOF_VOID_P MATCHES "8") - SET(LIB_POSTFIX "64" CACHE STRING "suffix for 32/64 dir placement") - MARK_AS_ADVANCED(LIB_POSTFIX) +# Set OSG_INSTALL_LIBDIR to specify the installation directories of object code libraries +IF(DEFINED LIB_POSTFIX) + # Use LIB_POSTFIX if defined + SET(OSG_INSTALL_LIBDIR lib${LIB_POSTFIX}) +ELSE() + IF(CMAKE_VERSION VERSION_LESS "2.8.5") + IF(UNIX AND NOT WIN32 AND NOT APPLE) + IF(CMAKE_SIZEOF_VOID_P MATCHES "8") + SET(LIB_POSTFIX "64" CACHE STRING "suffix for 32/64 dir placement") + MARK_AS_ADVANCED(LIB_POSTFIX) + ENDIF() + ENDIF() + IF(NOT DEFINED LIB_POSTFIX) + SET(LIB_POSTFIX "") + ENDIF() + SET(OSG_INSTALL_LIBDIR lib${LIB_POSTFIX}) + ELSE() + # Use the GNU standard installation directories for CMake >= 2.8.5 + INCLUDE(GNUInstallDirs) + SET(OSG_INSTALL_LIBDIR ${CMAKE_INSTALL_LIBDIR}) ENDIF() ENDIF() IF(NOT DEFINED LIB_POSTFIX)