Commit 0ab7ed25 authored by Rashad Kanavath's avatar Rashad Kanavath

PKG: find zip and common get_version() call

parent e10fd290
......@@ -78,6 +78,12 @@ if(WIN32 OR CMAKE_CROSSCOMPILING)
endif()
set(vars "${vars} ${req}=[${${req}}]\n")
endforeach(req)
find_program(ZIP_EXECUTABLE zip)
if(NOT ZIP_EXECUTABLE)
message(FATAL_ERROR "Cannot find zip executable. Please add it to your path")
endif()
else() #Unix like
foreach(req
SUPERBUILD_BINARY_DIR
......@@ -125,11 +131,12 @@ else() #(WIN32 OR CMAKE_CROSSCOMPILING)
set(PACKAGE_PLATFORM_NAME "Linux")
endif()
get_version("${SUPERBUILD_SOURCE_DIR}/CMake/External_itk.cmake" "ITK_SB_VERSION" ITK_SB_VERSION)
get_version("${OTB_SOURCE_DIR}/CMakeLists.txt" "OTB_VERSION_" OTB_VERSION_STRING)
set(PACKAGE_VERSION_STRING ${get_version_OTB_VERSION_STRING})
endif(UNIX)
endif() #(WIN32 OR CMAKE_CROSSCOMPILING)
get_version("${OTB_SOURCE_DIR}/CMakeLists.txt" "OTB_VERSION_" OTB_VERSION_STRING)
set(PACKAGE_VERSION_STRING ${get_version_OTB_VERSION_STRING})
include(${SUPERBUILD_SOURCE_DIR}/CMake/External_pkgtools.cmake)
set(EXTRA_CACHE_CONFIG
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment