mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-08-05 20:55:46 +03:00
cmake: Fix optional ABIMap detection
Signed-off-by: Andreas Schneider <asn@cryptomilk.org> Reviewed-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
This commit is contained in:
@@ -202,8 +202,14 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
# Search for python which is required
|
# Search for python which is required
|
||||||
|
if (ABIMap_FIND_REQURIED)
|
||||||
find_package(PythonInterp REQUIRED)
|
find_package(PythonInterp REQUIRED)
|
||||||
|
else()
|
||||||
|
find_package(PythonInterp)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
if (PYTHONINTERP_FOUND)
|
||||||
# Search for abimap tool used to generate the map files
|
# Search for abimap tool used to generate the map files
|
||||||
find_program(ABIMAP_EXECUTABLE NAMES abimap DOC "path to the abimap executable")
|
find_program(ABIMAP_EXECUTABLE NAMES abimap DOC "path to the abimap executable")
|
||||||
mark_as_advanced(ABIMAP_EXECUTABLE)
|
mark_as_advanced(ABIMAP_EXECUTABLE)
|
||||||
@@ -212,10 +218,15 @@ if (NOT ABIMAP_EXECUTABLE AND UNIX)
|
|||||||
message(STATUS "Could not find `abimap` in PATH."
|
message(STATUS "Could not find `abimap` in PATH."
|
||||||
" It can be found in PyPI as `abimap`"
|
" It can be found in PyPI as `abimap`"
|
||||||
" (try `pip install abimap`)")
|
" (try `pip install abimap`)")
|
||||||
else ()
|
|
||||||
set(ABIMAP_FOUND TRUE)
|
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
include(FindPackageHandleStandardArgs)
|
||||||
|
find_package_handle_standard_args(ABIMap REQUIRED_VARS ABIMAP_EXECUTABLE)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
|
||||||
|
if (ABIMAP_FOUND)
|
||||||
|
|
||||||
# Define helper scripts
|
# Define helper scripts
|
||||||
set(_EXTRACT_SYMBOLS_SCRIPT ${CMAKE_CURRENT_LIST_DIR}/ExtractSymbols.cmake)
|
set(_EXTRACT_SYMBOLS_SCRIPT ${CMAKE_CURRENT_LIST_DIR}/ExtractSymbols.cmake)
|
||||||
set(_GENERATE_MAP_SCRIPT ${CMAKE_CURRENT_LIST_DIR}/GenerateMap.cmake)
|
set(_GENERATE_MAP_SCRIPT ${CMAKE_CURRENT_LIST_DIR}/GenerateMap.cmake)
|
||||||
@@ -392,3 +403,5 @@ function(generate_map_file _TARGET_NAME)
|
|||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
|
endif (ABIMAP_FOUND)
|
||||||
|
Reference in New Issue
Block a user