diff --git a/CPackCommonRules.cmake b/CPackCommonRules.cmake index 8a1de1e..f4c4f9c 100644 --- a/CPackCommonRules.cmake +++ b/CPackCommonRules.cmake @@ -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}")