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
1324c0c4
Commit
1324c0c4
authored
5 years ago
by
Bienchen
Browse files
Options
Downloads
Patches
Plain Diff
SCHWED-4635: Changes to make the container work
parent
ab13e8d4
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
CMakeLists.txt
+2
-2
2 additions, 2 deletions
CMakeLists.txt
cmake_support/OST.cmake
+28
-0
28 additions, 0 deletions
cmake_support/OST.cmake
with
30 additions
and
2 deletions
CMakeLists.txt
+
2
−
2
View file @
1324c0c4
...
...
@@ -2,7 +2,7 @@
# Author: Marco Biasini
#-------------------------------------------------------------------------------
cmake_minimum_required
(
VERSION 3.1
2.1
FATAL_ERROR
)
cmake_minimum_required
(
VERSION 3.1
0.2
FATAL_ERROR
)
# Set CMake policies
# Behaviour of target_link_libraries, always link by full path. CMP0060 can
...
...
@@ -277,8 +277,8 @@ if (ENABLE_GUI)
find_package
(
Qt5Widgets REQUIRED
)
find_package
(
Qt5OpenGL REQUIRED
)
set
(
QT_LIBRARIES
${
QT_LIBRARIES
}
Qt5::Gui Qt5::Widgets Qt5::Core
)
ost_find_python_module
(
PyQt5.sip
)
ost_find_python_module
(
PyQt5
)
ost_find_python_module_alt
(
"PyQt5.sip;sip"
)
endif
()
if
(
ENABLE_SPNAV
)
...
...
This diff is collapsed.
Click to expand it.
cmake_support/OST.cmake
+
28
−
0
View file @
1324c0c4
...
...
@@ -759,6 +759,34 @@ macro(ost_find_python_module MODULE)
endif
()
endmacro
()
#-------------------------------------------------------------------------------
# make sure the previously detected Python interpreter has the given module
# while allowing alternative module names
#-------------------------------------------------------------------------------
macro
(
ost_find_python_module_alt MODULES
)
set
(
_PY_MODS
""
)
foreach
(
py_mod
${
MODULES
}
)
if
(
NOT PYTHON_MODULE_
${
py_mod
}
)
set
(
_PY_MODS
"
${
_PY_MODS
}
${
py_mod
}
"
)
message
(
STATUS
"Searching for python module
${
py_mod
}
for
${
PYTHON_BINARY
}
"
)
execute_process
(
COMMAND
${
PYTHON_BINARY
}
-c
"import
${
py_mod
}
"
OUTPUT_QUIET ERROR_QUIET
RESULT_VARIABLE _IMPORT_ERROR
)
if
(
NOT _IMPORT_ERROR
)
message
(
STATUS
"Found python module
${
py_mod
}
"
)
set
(
"PYTHON_MODULE_
${
py_mod
}
"
FOUND CACHE STRING
""
FORCE
)
break
()
endif
(
NOT _IMPORT_ERROR
)
else
()
message
(
STATUS
"Already found python module
${
py_mod
}
"
)
unset
(
_IMPORT_ERROR
)
break
()
endif
(
NOT PYTHON_MODULE_
${
py_mod
}
)
endforeach
(
py_mod
${
MODULES
}
)
if
(
_IMPORT_ERROR
)
message
(
FATAL_ERROR
"Could not find one of python modules
${
_PY_MODS
}
. Please install one of them."
)
endif
()
endmacro
()
#-------------------------------------------------------------------------------
# this macro tries to detect a very common problem during configuration stage:
...
...
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