Don't install pkg-config's .pc-file if it doesn't exist.

This commit is contained in:
Kolan Sh 2016-04-01 18:00:58 +03:00
parent 126f4cc3fe
commit c16c3e5d81
1 changed files with 4 additions and 2 deletions

View File

@ -10,8 +10,10 @@ SET (CPACK_RESOURCE_FILE_LICENSE
"${CMAKE_SOURCE_DIR}/COPYING")
SET (CPACK_PACKAGE_DESCRIPTION_FILE
"${CMAKE_SOURCE_DIR}/README")
INSTALL (FILES "${PROJECT_BINARY_DIR}/pkg-config/${PROJECT_LOWERCASE_NAME}-${MAJOR}.pc"
DESTINATION lib/pkgconfig)
SET (pkgconfig_file "${PROJECT_BINARY_DIR}/pkg-config/${PROJECT_LOWERCASE_NAME}-${MAJOR}.pc")
IF (EXISTS ${pkgconfig_file})
INSTALL (FILES ${pkgconfig_file} DESTINATION lib/pkgconfig)
ENDIF ()
#SET (CPACK_NSIS_PACKAGE_NAME "${PROJECT_NAME}")
#SET (CPACK_NSIS_DISPLAY_NAME "${PROJECT_NAME}")
SET (CPACK_PACKAGE_VERSION_MAJOR "${MAJOR}")