Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OCSR
UMANS
Commits
c4fd37f7
Commit
c4fd37f7
authored
Apr 15, 2020
by
Fabien Grzeskowiak
Browse files
fix linux GUI compilation
parent
714c7f03
Changes
1
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
c4fd37f7
...
...
@@ -18,7 +18,7 @@
# Website: https://project.inria.fr/crowdscience/
# See the file AUTHORS.md for a list of all contributors.
cmake_minimum_required
(
VERSION
2.8
)
cmake_minimum_required
(
VERSION
3.10
)
project
(
UMANS
)
set
(
CMAKE_CXX_STANDARD 17
)
...
...
@@ -77,23 +77,29 @@ target_link_libraries(UMANS-Library Engine)
if
(
UMANS_USE_GUI_APPLICATION
)
set
(
CMAKE_AUTOMOC ON
)
# necessary: gives the path to GUI src files to qt autogen files
include_directories
(
./src/GUI/
)
# set autogen variables for qt
set
(
CMAKE_INCLUDE_CURRENT_DIR ON
)
set
(
CMAKE_AUTOUIC ON
)
set
(
CMAKE_INCLUDE_CURRENT_DIR ON
)
# --- NOTE: To let this line work, add the following environment variable:
# CMAKE_PREFIX_PATH
# with a value such as C:\Qt\5.12.0\msvc2017_64 (depending on your Qt installation)
find_package
(
Qt5 COMPONENTS Core Widgets REQUIRED
)
set
(
CMAKE_AUTOMOC ON
)
set
(
CMAKE_AUTORCC ON
)
# find relevant packages
find_package
(
Qt5Core REQUIRED
)
find_package
(
Qt5Widgets REQUIRED
)
find_package
(
OpenGL REQUIRED
)
# --- include the Qt resources, so that the application icon gets shown
set
(
UI_RESOURCES src/GUI/UMANSQtGuiApplication.qrc
)
set
(
UI_RESOURCES src/GUI/UMANSQtGuiApplication.qrc
)
qt5_add_resources
(
UI_RESOURCES_RCC
${
UI_RESOURCES
}
)
# --- define the project itself
add_executable
(
UMANS-GUI src/GUI/main.cpp
${
src_GUI
}
${
UI_RESOURCES_RCC
}
)
add_executable
(
UMANS-GUI src/GUI/main.cpp
${
src_GUI
}
${
UI_RESOURCES_RCC
}
${
UI_HEADERS
}
)
# --- the project depends on some libraries
target_link_libraries
(
UMANS-GUI Engine Qt5::
Widgets opengl32.lib glu32.lib
)
target_link_libraries
(
UMANS-GUI Engine Qt5::
Core Qt5::Widgets
${
OPENGL_LIBRARIES
}
)
# --- post-build command: copy the required Qt DLLs, to prevent runtime errors
add_custom_command
(
TARGET UMANS-GUI POST_BUILD
...
...
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