Able to install to lib64 if LIB_SUFFIX var is set to 64

This commit is contained in:
jonathan MERCIER 2012-08-11 17:50:56 +02:00
parent 2f095cc9e3
commit 31c0212c25
2 changed files with 3 additions and 3 deletions

View File

@ -8,6 +8,7 @@ set(GLFW_VERSION_PATCH "0")
set(GLFW_VERSION_EXTRA "")
set(GLFW_VERSION "${GLFW_VERSION_MAJOR}.${GLFW_VERSION_MINOR}")
set(GLFW_VERSION_FULL "${GLFW_VERSION}.${GLFW_VERSION_PATCH}${GLFW_VERSION_EXTRA}")
set(LIB_SUFFIX "" CACHE STRING "Takes an empty string or 64. Directory where lib will be installed: lib or lib64")
option(GLFW_BUILD_EXAMPLES "Build the GLFW example programs" ON)
option(GLFW_BUILD_TESTS "Build the GLFW test programs" ON)
@ -265,7 +266,7 @@ if (_GLFW_X11_GLX OR _GLFW_COCOA_NSGL)
${GLFW_BINARY_DIR}/src/libglfw3.pc @ONLY)
install(FILES ${GLFW_BINARY_DIR}/src/libglfw3.pc
DESTINATION lib/pkgconfig)
DESTINATION lib${LIB_SUFFIX}/pkgconfig)
endif()
#--------------------------------------------------------------------

View File

@ -1,4 +1,3 @@
include_directories(${GLFW_SOURCE_DIR}/src
${GLFW_BINARY_DIR}/src
${glfw_INCLUDE_DIRS})
@ -59,5 +58,5 @@ if (BUILD_SHARED_LIBS)
target_link_libraries(glfw LINK_INTERFACE_LIBRARIES)
endif()
install(TARGETS glfw DESTINATION lib)
install(TARGETS glfw DESTINATION lib${LIB_SUFFIX} )