Commit fd8c7d09 authored by Rashad Kanavath's avatar Rashad Kanavath

PKG: missing check for required variables. (support out of source build)

parent 43f47f3b
......@@ -24,6 +24,16 @@ if(NOT GENERATE_PACKAGE AND NOT GENERATE_XDK)
return()
endif()
if(WIN32 OR CMAKE_CROSSCOMPILING)
if(NOT MXE_TARGET_DIR)
message(FATAL_ERROR "you must set MXE_TARGET_DIR")
endif()
if(NOT OTB_SOURCE_DIR)
message(FATAL_ERROR "you must set OTB_SOURCE_DIR")
endif()
endif()
include(${CMAKE_CURRENT_SOURCE_DIR}/PMacros.cmake)
if(OUT_OF_SOURCE_BUILD)
......@@ -61,7 +71,7 @@ if(WIN32 OR CMAKE_CROSSCOMPILING)
MONTEVERDI_INSTALL_DIR
)
if(NOT DEFINED ${req} OR "${${req}}" STREQUAL "")
message(FATAL_ERROR "you must set ${req} before calling this method")
message(FATAL_ERROR "you must set ${req}")
endif()
set(vars "${vars} ${req}=[${${req}}]\n")
endforeach(req)
......@@ -73,7 +83,7 @@ else() #Unix like
OTB_SOURCE_DIR
)
if(NOT DEFINED ${req} OR "${${req}}" STREQUAL "")
message(FATAL_ERROR "you must set ${req} before calling this method")
message(FATAL_ERROR "you must set ${req}")
endif()
set(vars "${vars} ${req}=[${${req}}]\n")
endforeach(req)
......
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