Skip to content
Snippets Groups Projects
Commit fd8c7d09 authored by Rashad Kanavath's avatar Rashad Kanavath
Browse files

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

parent 43f47f3b
Branches
Tags
No related merge requests found
...@@ -24,6 +24,16 @@ if(NOT GENERATE_PACKAGE AND NOT GENERATE_XDK) ...@@ -24,6 +24,16 @@ if(NOT GENERATE_PACKAGE AND NOT GENERATE_XDK)
return() return()
endif() 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) include(${CMAKE_CURRENT_SOURCE_DIR}/PMacros.cmake)
if(OUT_OF_SOURCE_BUILD) if(OUT_OF_SOURCE_BUILD)
...@@ -61,7 +71,7 @@ if(WIN32 OR CMAKE_CROSSCOMPILING) ...@@ -61,7 +71,7 @@ if(WIN32 OR CMAKE_CROSSCOMPILING)
MONTEVERDI_INSTALL_DIR MONTEVERDI_INSTALL_DIR
) )
if(NOT DEFINED ${req} OR "${${req}}" STREQUAL "") 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() endif()
set(vars "${vars} ${req}=[${${req}}]\n") set(vars "${vars} ${req}=[${${req}}]\n")
endforeach(req) endforeach(req)
...@@ -73,7 +83,7 @@ else() #Unix like ...@@ -73,7 +83,7 @@ else() #Unix like
OTB_SOURCE_DIR OTB_SOURCE_DIR
) )
if(NOT DEFINED ${req} OR "${${req}}" STREQUAL "") 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() endif()
set(vars "${vars} ${req}=[${${req}}]\n") set(vars "${vars} ${req}=[${${req}}]\n")
endforeach(req) endforeach(req)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment