Commit ba6da81e authored by Rashad Kanavath's avatar Rashad Kanavath

PKG: s/OTB_SOURCE_DIR/PACKAGE_OTB_SRC_DIR/g. OTB_SOURCE_DIR is used in...

PKG: s/OTB_SOURCE_DIR/PACKAGE_OTB_SRC_DIR/g. OTB_SOURCE_DIR is used in Modulemacros and external module build
parent e6e2d8ef
......@@ -14,8 +14,8 @@ if(NOT PROJECT_NAME)
endif()
if(PROJECT_NAME STREQUAL "OTB-SuperBuild")
if(NOT OTB_SOURCE_DIR)
get_filename_component(OTB_SOURCE_DIR ${OTB-SuperBuild_SOURCE_DIR} PATH)
if(NOT PACKAGE_OTB_SRC_DIR)
get_filename_component(PACKAGE_OTB_SRC_DIR ${OTB-SuperBuild_SOURCE_DIR} PATH)
endif()
endif()
......@@ -23,9 +23,9 @@ set(OUT_OF_SOURCE_BUILD FALSE)
if(PROJECT_NAME STREQUAL "OTBPackaging")
set(OUT_OF_SOURCE_BUILD TRUE)
set(GENERATE_PACKAGE ON)
if(NOT OTB_SOURCE_DIR)
get_filename_component(OTB_SOURCE_DIR ${OTBPackaging_SOURCE_DIR} PATH)
get_filename_component(OTB_SOURCE_DIR ${OTB_SOURCE_DIR} PATH)
if(NOT PACKAGE_OTB_SRC_DIR)
get_filename_component(PACKAGE_OTB_SRC_DIR ${OTBPackaging_SOURCE_DIR} PATH)
get_filename_component(PACKAGE_OTB_SRC_DIR ${PACKAGE_OTB_SRC_DIR} PATH)
endif()
option(OTB_WRAP_PYTHON "enable python wrapping" ON)
......@@ -45,10 +45,10 @@ if(WIN32 AND NOT MSVC)
endif()
endif()
if(NOT OTB_SOURCE_DIR)
message(FATAL_ERROR "you must set OTB_SOURCE_DIR")
if(NOT PACKAGE_OTB_SRC_DIR)
message(FATAL_ERROR "you must set PACKAGE_OTB_SRC_DIR")
endif()
set(SUPERBUILD_SOURCE_DIR ${OTB_SOURCE_DIR}/SuperBuild)
set(SUPERBUILD_SOURCE_DIR ${PACKAGE_OTB_SRC_DIR}/SuperBuild)
include(${CMAKE_CURRENT_SOURCE_DIR}/PMacros.cmake)
......@@ -89,7 +89,7 @@ endif()
if(WIN32 AND NOT MSVC)
foreach(req
OTB_SOURCE_DIR
PACKAGE_OTB_SRC_DIR
OTB_BINARY_DIR
OTB_INSTALL_DIR
)
......@@ -103,7 +103,7 @@ else() #Unix like
SUPERBUILD_BINARY_DIR
SUPERBUILD_INSTALL_DIR
SUPERBUILD_SOURCE_DIR
OTB_SOURCE_DIR
PACKAGE_OTB_SRC_DIR
)
if(NOT DEFINED ${req} OR "${${req}}" STREQUAL "")
message(FATAL_ERROR "you must set ${req}")
......@@ -165,7 +165,7 @@ endif()
#get version of OTB from source_dir/CMakeLists.txt
get_version(
INPUT_FILE "${OTB_SOURCE_DIR}/CMakeLists.txt"
INPUT_FILE "${PACKAGE_OTB_SRC_DIR}/CMakeLists.txt"
MATCH_STRINGS "OTB_VERSION_MAJOR" "OTB_VERSION_MINOR" "OTB_VERSION_PATCH"
PREFIX PKG
)
......
......@@ -50,14 +50,14 @@ macro(macro_setup_cmake_project pkg)
include(CMakeParseArguments)
include(CMakeDetermineSystem)
set(CMAKE_BUILD_TYPE Release)
set(OTB_SOURCE_DIR \"${OTB_SOURCE_DIR}\")
set(PACKAGE_OTB_SRC_DIR \"${PACKAGE_OTB_SRC_DIR}\")
set(OTB_BINARY_DIR \"${OTB_BINARY_DIR}\")
set(OTB_INSTALL_DIR \"${OTB_INSTALL_DIR}\")
set(OTB_INSTALL_DATA_DIR \"${PKG_OTB_INSTALL_DATA_DIR}\")
set(QT_PLUGINS_DIR \"${QT_PLUGINS_DIR}\")
set(QT_TRANSLATIONS_DIR \"${QT_TRANSLATIONS_DIR}\")
set(DEPENDENCIES_INSTALL_DIR \"${DEPENDENCIES_INSTALL_DIR}\")
set(PACKAGE_SUPPORT_FILES_DIR \"${OTB_SOURCE_DIR}/SuperBuild/Packaging/Files\")
set(PACKAGE_SUPPORT_FILES_DIR \"${PACKAGE_OTB_SRC_DIR}/SuperBuild/Packaging/Files\")
set(CMAKE_INSTALL_PREFIX \"${CMAKE_INSTALL_PREFIX}\")
set(PKG_ITK_SB_VERSION \"${PKG_ITK_SB_VERSION}\")
......@@ -75,12 +75,12 @@ macro(macro_setup_cmake_project pkg)
if(UNIX)
if(APPLE)
set(README_FILE ${OTB_SOURCE_DIR}/Documentation/Cookbook/rst/Installation_Macx.txt)
set(README_FILE ${PACKAGE_OTB_SRC_DIR}/Documentation/Cookbook/rst/Installation_Macx.txt)
else() #not osx
set(README_FILE ${OTB_SOURCE_DIR}/Documentation/Cookbook/rst/Installation_Linux.txt)
set(README_FILE ${PACKAGE_OTB_SRC_DIR}/Documentation/Cookbook/rst/Installation_Linux.txt)
endif() #if(APPLE)
else() #windows
set(README_FILE ${OTB_SOURCE_DIR}/Documentation/Cookbook/rst/Installation_Windows.txt)
set(README_FILE ${PACKAGE_OTB_SRC_DIR}/Documentation/Cookbook/rst/Installation_Windows.txt)
endif() #if(UNIX)
configure_file(
......
......@@ -495,7 +495,7 @@ function(func_install_monteverdi_support_files)
# Just check if required variables are defined.
foreach(req
OTB_SOURCE_DIR
PACKAGE_OTB_SRC_DIR
PACKAGE_SUPPORT_FILES_DIR
QT_PLUGINS_DIR
PKG_STAGE_BIN_DIR
......@@ -541,7 +541,7 @@ function(func_install_monteverdi_support_files)
message(FATAL_ERROR "Error ${OTB_INSTALL_DIR}/${PKG_OTB_TRANSLATIONS_DIRNAME} not exists")
endif()
file(GLOB APP_TS_FILES ${OTB_SOURCE_DIR}/i18n/*.ts) # qm files
file(GLOB APP_TS_FILES ${PACKAGE_OTB_SRC_DIR}/i18n/*.ts) # qm files
foreach(APP_TS_FILE ${APP_TS_FILES})
get_filename_component(APP_TS_FILENAME ${APP_TS_FILE} NAME_WE)
install(FILES ${OTB_INSTALL_DIR}/${PKG_OTB_TRANSLATIONS_DIRNAME}/${APP_TS_FILENAME}.qm
......
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