-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
49 changed files
with
640 additions
and
252 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
IF(RPM) | ||
MACRO(FIND_DEP V) | ||
SET(out ${V}_DEP) | ||
IF (NOT DEFINED ${out}) | ||
IF(EXISTS ${${V}} AND NOT IS_DIRECTORY ${${V}}) | ||
EXECUTE_PROCESS(COMMAND ${ARGN} RESULT_VARIABLE res OUTPUT_VARIABLE O OUTPUT_STRIP_TRAILING_WHITESPACE) | ||
ELSE() | ||
SET(res 1) | ||
ENDIF() | ||
IF (res) | ||
SET(O) | ||
ELSE() | ||
MESSAGE(STATUS "Need ${O} for ${${V}}") | ||
ENDIF() | ||
SET(${out} ${O} CACHE INTERNAL "Package that contains ${${V}}" FORCE) | ||
ENDIF() | ||
ENDMACRO() | ||
|
||
GET_CMAKE_PROPERTY(ALL_VARS CACHE_VARIABLES) | ||
FOREACH (V ${ALL_VARS}) | ||
GET_PROPERTY(H CACHE ${V} PROPERTY HELPSTRING) | ||
IF (H MATCHES "^Have library [^/]" AND ${V}) | ||
STRING(REGEX REPLACE "^Have library " "" L ${H}) | ||
SET(V ${L}_LIBRARY) | ||
FIND_LIBRARY(${V} ${L}) | ||
ENDIF() | ||
GET_PROPERTY(T CACHE ${V} PROPERTY TYPE) | ||
IF ((T STREQUAL FILEPATH OR V MATCHES "^CMAKE_COMMAND$") AND ${V} MATCHES "^/") | ||
IF (RPM) | ||
FIND_DEP(${V} rpm -q --qf "%{NAME}" -f ${${V}}) | ||
ELSE() # must be DEB | ||
MESSAGE(FATAL_ERROR "Not implemented") | ||
ENDIF () | ||
SET(BUILD_DEPS ${BUILD_DEPS} ${${V}_DEP}) | ||
ENDIF() | ||
ENDFOREACH() | ||
LIST(REMOVE_DUPLICATES BUILD_DEPS) | ||
STRING(REPLACE ";" " " CPACK_RPM_BUILDREQUIRES "${BUILD_DEPS}") | ||
ENDIF(RPM) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.