Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
otb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
273
Issues
273
List
Boards
Labels
Service Desk
Milestones
Merge Requests
8
Merge Requests
8
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Main Repositories
otb
Commits
ed21088c
Commit
ed21088c
authored
Apr 22, 2015
by
Guillaume Pasero
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ENH: improve FindOssim script
parent
3915f2a2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
8 deletions
+13
-8
CMake/FindOssim.cmake
CMake/FindOssim.cmake
+13
-8
No files found.
CMake/FindOssim.cmake
View file @
ed21088c
...
...
@@ -14,14 +14,19 @@ endif()
find_path
(
OSSIM_INCLUDE_DIR
NAMES ossim/init/ossimInit.h
)
file
(
READ
"
${
OSSIM_INCLUDE_DIR
}
/ossim/ossimVersion.h"
_ossim_version_h_CONTENTS
)
string
(
REGEX REPLACE
".*# *define OSSIM_VERSION *
\"
([0-9.]+)
\"
.*"
"
\\
1"
OSSIM_VERSION
"
${
_ossim_version_h_CONTENTS
}
"
)
string
(
REGEX REPLACE
"([0-9]+)
\\
.([0-9]+)
\\
.([0-9]+)"
"
\\
1"
OSSIM_MAJOR_VERSION_NUMBER
"
${
OSSIM_VERSION
}
"
)
string
(
REGEX REPLACE
"([0-9]+)
\\
.([0-9]+)
\\
.([0-9]+)"
"
\\
2"
OSSIM_MINOR_VERSION_NUMBER
"
${
OSSIM_VERSION
}
"
)
string
(
REGEX REPLACE
"([0-9]+)
\\
.([0-9]+)
\\
.([0-9]+)"
"
\\
3"
OSSIM_PATCH_VERSION_NUMBER
"
${
OSSIM_VERSION
}
"
)
math
(
EXPR OSSIM_VERSION_NUMBER
"((
${
OSSIM_MAJOR_VERSION_NUMBER
}
)*100+
${
OSSIM_MINOR_VERSION_NUMBER
}
)*100+
${
OSSIM_PATCH_VERSION_NUMBER
}
"
)
if
(
EXISTS
"
${
OSSIM_INCLUDE_DIR
}
/ossim/ossimVersion.h"
)
file
(
READ
"
${
OSSIM_INCLUDE_DIR
}
/ossim/ossimVersion.h"
_ossim_version_h_CONTENTS
)
string
(
REGEX REPLACE
".*# *define OSSIM_VERSION *
\"
([0-9.]+)
\"
.*"
"
\\
1"
OSSIM_VERSION
"
${
_ossim_version_h_CONTENTS
}
"
)
string
(
REGEX REPLACE
"([0-9]+)
\\
.([0-9]+)
\\
.([0-9]+)"
"
\\
1"
OSSIM_MAJOR_VERSION_NUMBER
"
${
OSSIM_VERSION
}
"
)
string
(
REGEX REPLACE
"([0-9]+)
\\
.([0-9]+)
\\
.([0-9]+)"
"
\\
2"
OSSIM_MINOR_VERSION_NUMBER
"
${
OSSIM_VERSION
}
"
)
string
(
REGEX REPLACE
"([0-9]+)
\\
.([0-9]+)
\\
.([0-9]+)"
"
\\
3"
OSSIM_PATCH_VERSION_NUMBER
"
${
OSSIM_VERSION
}
"
)
math
(
EXPR OSSIM_VERSION_NUMBER
"((
${
OSSIM_MAJOR_VERSION_NUMBER
}
)*100+
${
OSSIM_MINOR_VERSION_NUMBER
}
)*100+
${
OSSIM_PATCH_VERSION_NUMBER
}
"
)
else
()
if
(
NOT Ossim_FIND_QUIETLY
)
message
(
WARNING
"ossimVersion.h not found !"
)
endif
()
endif
()
find_library
(
OSSIM_LIBRARY
NAMES ossim
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment