Browse Source

lib != lib64, lib != lib32

master
Kolan Sh 2 years ago
parent
commit
9ba1995060
3 changed files with 17 additions and 8 deletions
  1. +5
    -1
      CPackCommonRules.cmake
  2. +5
    -1
      PkgConfigCommonRules.cmake
  3. +7
    -6
      ValaLibCommonRules.cmake

+ 5
- 1
CPackCommonRules.cmake 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}")


+ 5
- 1
PkgConfigCommonRules.cmake 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}")


+ 7
- 6
ValaLibCommonRules.cmake View File

@@ -42,12 +42,13 @@ IF (LibIsPlugin)
SET (install_prefix "/${LibInstallPrefix}/${LibName}-${MAJOR}")
ENDIF (LibIsPlugin)

SET (lib "lib")
IF("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
SET (lib "lib64")
ENDIF()

IF (UNIX)
IF("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
SET (install_dest lib64${install_prefix})
ELSE()
SET (install_dest lib${install_prefix})
ENDIF()
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)


Loading…
Cancel
Save