Check LibPkgModules for empty value.

This commit is contained in:
Kolan Sh 2017-12-19 08:23:53 +03:00
parent f4fd3637a3
commit 7797a9d1cc
2 changed files with 6 additions and 2 deletions

View File

@ -12,7 +12,9 @@ VALA_PRECOMPILE (VALA_C ${BinSources}
GENERATE_VAPI GENERATE_VAPI
GENERATE_HEADER GENERATE_HEADER
) )
PKG_CHECK_MODULES (PKGS REQUIRED ${BinPkgModules}) IF (NOT "${LibPkgModules}" STREQUAL "")
PKG_CHECK_MODULES (PKGS REQUIRED ${LibPkgModules})
ENDIF ()
INCLUDE_DIRECTORIES (${PKGS_INCLUDE_DIRS} ${CMAKE_BINARY_DIR}/po) INCLUDE_DIRECTORIES (${PKGS_INCLUDE_DIRS} ${CMAKE_BINARY_DIR}/po)
ADD_EXECUTABLE (${BinName} ${VALA_C} ${BinExtraSources}) ADD_EXECUTABLE (${BinName} ${VALA_C} ${BinExtraSources})
ADD_DEFINITIONS (-DGETTEXT_PACKAGE="${PROJECT_LOWERCASE_NAME}-${MAJOR}") ADD_DEFINITIONS (-DGETTEXT_PACKAGE="${PROJECT_LOWERCASE_NAME}-${MAJOR}")

View File

@ -22,7 +22,9 @@ VALA_PRECOMPILE (VALA_C ${LibSources}
GENERATE_VAPI GENERATE_VAPI
GENERATE_HEADER ${generate_header} GENERATE_HEADER ${generate_header}
) )
IF (NOT "${LibPkgModules}" STREQUAL "")
PKG_CHECK_MODULES (PKGS REQUIRED ${LibPkgModules}) PKG_CHECK_MODULES (PKGS REQUIRED ${LibPkgModules})
ENDIF ()
INCLUDE_DIRECTORIES (${PKGS_INCLUDE_DIRS} ${CMAKE_BINARY_DIR}/po) INCLUDE_DIRECTORIES (${PKGS_INCLUDE_DIRS} ${CMAKE_BINARY_DIR}/po)
ADD_LIBRARY (${LibName} SHARED ${VALA_C} ${LibExtraSources}) ADD_LIBRARY (${LibName} SHARED ${VALA_C} ${LibExtraSources})
ADD_DEFINITIONS (-DGETTEXT_PACKAGE="${PROJECT_LOWERCASE_NAME}-${MAJOR}") ADD_DEFINITIONS (-DGETTEXT_PACKAGE="${PROJECT_LOWERCASE_NAME}-${MAJOR}")