Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
FORMUS3IC_LAS3
/
embb
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
fde3ae66
authored
Oct 13, 2014
by
Christian Kern
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Set doc install dir by conventional naming scheme relative to PREFIX
parent
d6499479
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
18 deletions
+17
-18
CMakeCommon/SetInstallPaths.cmake
+17
-18
No files found.
CMakeCommon/SetInstallPaths.cmake
View file @
fde3ae66
...
@@ -25,15 +25,10 @@
...
@@ -25,15 +25,10 @@
## Sets the install base path for headers, libraries, and the documentation
## Sets the install base path for headers, libraries, and the documentation
#
#
function
(
SetInstallPaths
)
function
(
SetInstallPaths
)
if
(
DEFINED INSTALL_PREFIX
)
if
(
WIN32
)
# User given install path given when calling cmake as "-DINSTALL_PREFIX=...".
if
(
DEFINED INSTALL_PREFIX
)
set
(
CMAKE_INSTALL_PREFIX
${
INSTALL_PREFIX
}
)
# User given install path given when calling cmake as "-DINSTALL_PREFIX=...".
set
(
INSTALL_PREFIX_DOCS
"
${
CMAKE_INSTALL_PREFIX
}
/doc"
)
set
(
CMAKE_INSTALL_PREFIX
${
INSTALL_PREFIX
}
)
else
()
# Default install path is in build directory.
if
(
DEFINED UNIX
)
set
(
CMAKE_INSTALL_PREFIX
"/usr/local"
)
set
(
INSTALL_PREFIX_DOCS
"/usr/local/share/doc/
${
CMAKE_PROJECT_NAME
}
-
${
EMBB_BASE_VERSION_MAJOR
}
.
${
EMBB_BASE_VERSION_MINOR
}
.
${
EMBB_BASE_VERSION_PATCH
}
"
)
else
()
else
()
file
(
TO_CMAKE_PATH
"$ENV{ProgramFiles}"
_PROG_FILES
)
# 32-bit dir on win32, useless to us on win64
file
(
TO_CMAKE_PATH
"$ENV{ProgramFiles}"
_PROG_FILES
)
# 32-bit dir on win32, useless to us on win64
file
(
TO_CMAKE_PATH
"$ENV{ProgramFiles(x86)}"
_PROG_FILES_X86
)
# 32-bit dir: only set on win64
file
(
TO_CMAKE_PATH
"$ENV{ProgramFiles(x86)}"
_PROG_FILES_X86
)
# 32-bit dir: only set on win64
...
@@ -52,16 +47,20 @@ function(SetInstallPaths)
...
@@ -52,16 +47,20 @@ function(SetInstallPaths)
endif
()
endif
()
endif
()
endif
()
set
(
CMAKE_INSTALL_PREFIX
"
${
_PROGFILESDIR
}
/
${
CMAKE_PROJECT_NAME
}
-
${
EMBB_BASE_VERSION_MAJOR
}
.
${
EMBB_BASE_VERSION_MINOR
}
.
${
EMBB_BASE_VERSION_PATCH
}
"
)
set
(
CMAKE_INSTALL_PREFIX
"
${
_PROGFILESDIR
}
/
${
CMAKE_PROJECT_NAME
}
-
${
EMBB_BASE_VERSION_MAJOR
}
.
${
EMBB_BASE_VERSION_MINOR
}
.
${
EMBB_BASE_VERSION_PATCH
}
"
)
set
(
INSTALL_PREFIX_DOCS
"
${
CMAKE_INSTALL_PREFIX
}
/doc"
)
message
(
${
INSTALL_PREFIX_DOCS
}
)
IF
(
WIN32
)
STRING
(
REPLACE
"
\\
"
"
\\\\
"
CMAKE_INSTALL_PREFIX
${
CMAKE_INSTALL_PREFIX
}
)
STRING
(
REPLACE
"/"
"
\\\\
"
CMAKE_INSTALL_PREFIX
${
CMAKE_INSTALL_PREFIX
}
)
STRING
(
REPLACE
"
\\
"
"
\\\\
"
INSTALL_PREFIX_DOCS
${
INSTALL_PREFIX_DOCS
}
)
STRING
(
REPLACE
"/"
"
\\\\
"
INSTALL_PREFIX_DOCS
${
INSTALL_PREFIX_DOCS
}
)
endif
()
endif
()
endif
()
set
(
INSTALL_PREFIX_DOCS
"
${
CMAKE_INSTALL_PREFIX
}
/doc"
)
#STRING(REPLACE "\\" "\\\\" CMAKE_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX} )
#STRING(REPLACE "/" "\\\\" CMAKE_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX} )
#STRING(REPLACE "/" "\\\\" INSTALL_PREFIX_DOCS ${INSTALL_PREFIX_DOCS} )
#STRING(REPLACE "\\" "\\\\" INSTALL_PREFIX_DOCS ${INSTALL_PREFIX_DOCS} )
else
()
if
(
DEFINED INSTALL_PREFIX
)
# User given install path given when calling cmake as "-DINSTALL_PREFIX=...".
set
(
CMAKE_INSTALL_PREFIX
${
INSTALL_PREFIX
}
)
else
()
set
(
CMAKE_INSTALL_PREFIX
"/usr/local"
)
endif
()
set
(
INSTALL_PREFIX_DOCS
"
${
CMAKE_INSTALL_PREFIX
}
/share/doc/
${
CMAKE_PROJECT_NAME
}
-
${
EMBB_BASE_VERSION_MAJOR
}
.
${
EMBB_BASE_VERSION_MINOR
}
.
${
EMBB_BASE_VERSION_PATCH
}
"
)
endif
()
endif
()
set
(
INSTALL_PREFIX
${
INSTALL_PREFIX
}
PARENT_SCOPE
)
set
(
INSTALL_PREFIX
${
INSTALL_PREFIX
}
PARENT_SCOPE
)
...
...
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