Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
openstructure
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Analyze
Contributor 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
schwede
openstructure
Commits
ce32e1dc
Commit
ce32e1dc
authored
12 years ago
by
Andreas Schenk
Browse files
Options
Downloads
Patches
Plain Diff
Allow user override of the cmake generator at cmake config time for Linux
parent
0ec4609c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
deployment/linux/CMakeLists.txt
+21
-12
21 additions, 12 deletions
deployment/linux/CMakeLists.txt
with
21 additions
and
12 deletions
deployment/linux/CMakeLists.txt
+
21
−
12
View file @
ce32e1dc
...
...
@@ -5,16 +5,23 @@
#
#-------------------------------------------------------------------------------
#include(CheckLSBTypes)
if
(
NOT CPACK_GENERATOR
)
include
(
CheckLSBTypes
)
if
((
${
LSB_DISTRIBUTOR_ID
}
MATCHES
"centos"
AND
${
LSB_RELEASE
}
GREATER 5.9
)
OR
(
${
LSB_DISTRIBUTOR_ID
}
MATCHES
"redhat"
AND
${
LSB_RELEASE
}
GREATER 5.9
)
OR
(
${
LSB_DISTRIBUTOR_ID
}
MATCHES
"fedora"
))
set
(
CPACK_GENERATOR
"RPM"
)
elseif
(
${
LSB_DISTRIBUTOR_ID
}
MATCHES
"debian"
)
set
(
CPACK_GENERATOR
"DEB"
)
else
()
set
(
CPACK_GENERATOR
"TGZ"
)
endif
()
endif
(
NOT CPACK_GENERATOR
)
if
((
${
LSB_DISTRIBUTOR_ID
}
MATCHES
"centos"
AND
${
LSB_RELEASE
}
GREATER 5.9
)
OR
(
${
LSB_DISTRIBUTOR_ID
}
MATCHES
"redhat"
AND
${
LSB_RELEASE
}
GREATER 5.9
)
OR
(
${
LSB_DISTRIBUTOR_ID
}
MATCHES
"fedora"
))
set
(
CPACK_GENERATOR
"RPM"
)
elseif
(
${
LSB_DISTRIBUTOR_ID
}
MATCHES
"debian"
)
set
(
CPACK_GENERATOR
"DEB"
)
if
(
CPACK_GENERATOR MATCHES
"DEB"
)
set
(
CPACK_DEBIAN_PACKAGE_MAINTAINER
"The OpenStructure developers"
)
else
()
elseif
(
CPACK_GENERATOR MATCHES
"RPM"
)
elseif
(
CPACK_GENERATOR MATCHES
"TGZ"
)
install
(
CODE
"
if(NOT
${
CMAKE_INSTALL_PREFIX
}
MATCHES
\$
{CMAKE_INSTALL_PREFIX})
set(LIB_DIR
${
LIB_DIR
}
)#pass libdir variable in install code block
...
...
@@ -31,13 +38,13 @@ else()
\"\$
{CMAKE_INSTALL_PREFIX}/bin/chemdict_tool
\"
\"\$
{CMAKE_INSTALL_PREFIX}/bin/molck
\"
\"\$
{CMAKE_INSTALL_PREFIX}/libexec/openstructure/gosty
\"
)
copy_python(
${
PYTHON_INCLUDE_PATH
}
${
PYTHON_VERSION
}
new_python_binary)
list(APPEND OST_BINARIES
\$
{new_python_binary})
file(GLOB_RECURSE OST_PYMODS
\"\$
{CMAKE_INSTALL_PREFIX}/
${
LIB_DIR
}
/*.so
\"
)
list(APPEND OST_BINARIES
\$
{OST_PYMODS})
#copy Qt stuff
copy_qt(
${
QT_LIBRARY_DIR
}
${
QT_PLUGINS_DIR
}
qt_plugins)
list(APPEND OST_BINARIES
\$
{qt_plugins})
...
...
@@ -45,6 +52,8 @@ else()
copy_dependencies(
\"\$
{OST_BINARIES}
\"
)
endif(NOT
${
CMAKE_INSTALL_PREFIX
}
MATCHES
\$
{CMAKE_INSTALL_PREFIX})
"
)
elseif
(
CPACK_GENERATOR MATCHES
"TGZ_NODEP"
)
set
(
CPACK_GENERATOR
"TGZ"
)
#set(CPACK_INSTALL_CMAKE_PROJECTS "")
endif
()
else
(
CPACK_GENERATOR MATCHES
"DEB"
)
message
(
FATAL_ERROR
"Uknown CPack generator"
)
endif
(
CPACK_GENERATOR MATCHES
"DEB"
)
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