lib != lib64, lib != lib32

This commit is contained in:
Kolan Sh 2018-02-13 23:13:01 +03:00
parent 5aec8e830a
commit 9ba1995060
3 changed files with 17 additions and 8 deletions

View File

@ -12,7 +12,11 @@ SET (CPACK_PACKAGE_DESCRIPTION_FILE
"${CMAKE_SOURCE_DIR}/README")
SET (pkgconfig_file "${PROJECT_BINARY_DIR}/pkg-config/${PROJECT_LOWERCASE_NAME}-${MAJOR}.pc")
IF (EXISTS ${pkgconfig_file})
INSTALL (FILES ${pkgconfig_file} DESTINATION lib/pkgconfig)
SET (lib "lib")
IF("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
SET (lib "lib64")
ENDIF()
INSTALL (FILES ${pkgconfig_file} DESTINATION ${lib}/pkgconfig)
ENDIF ()
#SET (CPACK_NSIS_PACKAGE_NAME "${PROJECT_NAME}")
#SET (CPACK_NSIS_DISPLAY_NAME "${PROJECT_NAME}")

View File

@ -4,7 +4,11 @@ ELSE (WIN32)
SET (PkgConfigPrefix ${CMAKE_INSTALL_PREFIX})
ENDIF (WIN32)
SET (PkgConfigExecPrefix "\${prefix}")
SET (PkgConfigLibDir "\${exec_prefix}/lib")
SET (lib "lib")
IF("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
SET (lib "lib64")
ENDIF()
SET (PkgConfigLibDir "\${exec_prefix}/${lib}")
SET (PkgConfigIncludeDir "\${prefix}/include")
SET (PkgConfigName "${CMAKE_PROJECT_NAME}")

View File

@ -42,12 +42,13 @@ IF (LibIsPlugin)
SET (install_prefix "/${LibInstallPrefix}/${LibName}-${MAJOR}")
ENDIF (LibIsPlugin)
IF (UNIX)
SET (lib "lib")
IF("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
SET (install_dest lib64${install_prefix})
ELSE()
SET (install_dest lib${install_prefix})
SET (lib "lib64")
ENDIF()
IF (UNIX)
SET (install_dest ${lib}${install_prefix})
#INCLUDE (GNUInstallDirs)
#SET (install_dest ${CMAKE_INSTALL_FULL_LIBDIR}${install_prefix})
ELSEIF (WIN32)
@ -61,7 +62,7 @@ IF (LibInstall)
ELSE (LibNoApi)
INSTALL (TARGETS ${LibName} RUNTIME DESTINATION ${install_dest}
LIBRARY DESTINATION ${install_dest}
ARCHIVE DESTINATION lib)
ARCHIVE DESTINATION ${lib})
INSTALL (FILES ${CMAKE_CURRENT_BINARY_DIR}/${LibName}-${MAJOR}.h DESTINATION include)
INSTALL (FILES ${CMAKE_CURRENT_BINARY_DIR}/${LibName}-${MAJOR}.vapi DESTINATION share/vala/vapi)
ENDIF (LibNoApi)