Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
otb
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Gaëlle USSEGLIO
otb
Commits
23d1cb08
Commit
23d1cb08
authored
8 years ago
by
Rashad Kanavath
Browse files
Options
Downloads
Patches
Plain Diff
PKG: move parsing configureMonteverdi.h
parent
2579e137
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
SuperBuild/Packaging/PMacros.cmake
+0
-23
0 additions, 23 deletions
SuperBuild/Packaging/PMacros.cmake
SuperBuild/Packaging/PackageHelper.cmake
+31
-2
31 additions, 2 deletions
SuperBuild/Packaging/PackageHelper.cmake
with
31 additions
and
25 deletions
SuperBuild/Packaging/PMacros.cmake
+
0
−
23
View file @
23d1cb08
...
...
@@ -21,28 +21,6 @@ macro(macro_setup_cmake_project pkg)
set
(
PKG_GENERATE_XDK OFF
)
endif
()
set
(
ConfigureMonteverdi_H
${
OTB_BINARY_DIR
}
/Modules/Visualization/MonteverdiCore/ConfigureMonteverdi.h
)
if
(
NOT EXISTS
${
ConfigureMonteverdi_H
}
)
message
(
FATAL_ERROR
"
${
ConfigureMonteverdi_H
}
does not exists. Cannot continue"
)
endif
()
file
(
STRINGS
"
${
ConfigureMonteverdi_H
}
"
ConfigureMonteverdi_H_CONTENTS REGEX
"^#define.Monteverdi_INSTALL_DATA_DIR"
)
string
(
REGEX REPLACE
"^#define.Monteverdi_INSTALL_DATA_DIR"
""
ConfigureMonteverdi_H_CONTENTS
${
ConfigureMonteverdi_H_CONTENTS
}
)
if
(
NOT ConfigureMonteverdi_H_CONTENTS
)
message
(
FATAL_ERROR
"parse error in
${
ConfigureMonteverdi_H
}
. Cannot continue"
)
endif
()
string
(
REGEX REPLACE
"
\"
"
""
PKG_OTB_INSTALL_DATA_DIR
"
${
ConfigureMonteverdi_H_CONTENTS
}
"
)
if
(
NOT PKG_OTB_INSTALL_DATA_DIR
)
message
(
FATAL_ERROR
"parse error in
${
ConfigureMonteverdi_H_CONTENTS
}
. Cannot continue"
)
endif
()
string
(
STRIP
"
${
PKG_OTB_INSTALL_DATA_DIR
}
"
PKG_OTB_INSTALL_DATA_DIR
)
#set archive name inside loop
file
(
WRITE
"
${
PACKAGE_PROJECT_DIR
}
/src/CMakeLists.txt"
...
...
@@ -53,7 +31,6 @@ macro(macro_setup_cmake_project pkg)
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
}
\"
)
...
...
This diff is collapsed.
Click to expand it.
SuperBuild/Packaging/PackageHelper.cmake
+
31
−
2
View file @
23d1cb08
...
...
@@ -514,10 +514,39 @@ function(func_install_monteverdi_support_files)
#<prefix>/share for otb i18n directory. This is different from qt's i18N directory
#which is <prefix>/share/qt4/translations.
#set(PKG_xxOTB_Ixxx18N_DIR "${PKG_STAGE_DIR}/${OTB_INSTALL_DATA_DIR}/i18n")
#set(PKG_xxOTB_Ixxx18N_DIR "${PKG_STAGE_DIR}/${PKG_OTB_INSTALL_DATA_DIR}/i18n")
# we find this value by parsing ConfigureMonteverdi.h
set
(
ConfigureMonteverdi_H
"
${
OTB_BINARY_DIR
}
/Modules/Visualization/MonteverdiCore/ConfigureMonteverdi.h"
)
if
(
NOT EXISTS
"
${
ConfigureMonteverdi_H
}
"
)
message
(
FATAL_ERROR
"
${
ConfigureMonteverdi_H
}
does not exists. Cannot continue"
)
endif
()
file
(
STRINGS
"
${
ConfigureMonteverdi_H
}
"
ConfigureMonteverdi_H_CONTENTS
REGEX
"^#define.Monteverdi_INSTALL_DATA_DIR"
)
string
(
REGEX REPLACE
"^#define.Monteverdi_INSTALL_DATA_DIR"
""
ConfigureMonteverdi_H_CONTENTS
${
ConfigureMonteverdi_H_CONTENTS
}
)
if
(
NOT ConfigureMonteverdi_H_CONTENTS
)
message
(
FATAL_ERROR
"Parse error in
${
ConfigureMonteverdi_H
}
. Cannot continue"
)
endif
()
string
(
REGEX REPLACE
"
\"
"
""
PKG_OTB_INSTALL_DATA_DIR
"
${
ConfigureMonteverdi_H_CONTENTS
}
"
)
set
(
PKG_OTB_TRANSLATIONS_DIRNAME
"
${
OTB_INSTALL_DATA_DIR
}
/i18n"
)
if
(
NOT PKG_OTB_INSTALL_DATA_DIR
)
message
(
FATAL_ERROR
"parse error in
${
ConfigureMonteverdi_H_CONTENTS
}
. Cannot continue"
)
endif
()
string
(
STRIP
"
${
PKG_OTB_INSTALL_DATA_DIR
}
"
PKG_OTB_INSTALL_DATA_DIR
)
set
(
PKG_OTB_TRANSLATIONS_DIRNAME
"
${
PKG_OTB_INSTALL_DATA_DIR
}
/i18n"
)
# Just check if required variables are defined.
foreach
(
req
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment