CMake: Proper support for lib vs lib64 installation

Determine name of library installation directory, i.e. "lib" vs "lib64",
which differs between all Debian-based vs all other Linux distros.
See cmake bug #11964, http://cmake.org/gitweb?p=cmake.git;a=commit;h=126c993d
Also provide a script for older (<=2.8.4) cmake
This commit is contained in:
ThorstenB
2011-11-25 12:06:54 +01:00
parent 3c9fec78fa
commit ec5d067d28
3 changed files with 195 additions and 2 deletions

View File

@@ -16,7 +16,7 @@ macro(simgear_component name includePath sources headers)
set(libName "sg${name}")
add_library(${libName} STATIC ${sources} ${headers})
install (TARGETS ${libName} ARCHIVE DESTINATION lib${LIB_SUFFIX})
install (TARGETS ${libName} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
install (FILES ${headers} DESTINATION include/simgear/${includePath})
endif()