forked from Hopsan/hopsan
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
82 lines (70 loc) · 2.74 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
cmake_minimum_required(VERSION 3.0)
project(Hopsan)
cmake_policy(SET CMP0054 NEW)
cmake_policy(SET CMP0079 NEW)
set(HOPSANCORE_INSTALL_DST "HopsanCore")
message(WARNING "Hopsan CMake support is still experimental, but should be working for for GCC / MinGW and limited MSVC build")
enable_testing()
add_subdirectory(doc)
add_subdirectory(HopsanCore)
add_subdirectory(componentLibraries)
add_subdirectory(HopsanCLI)
add_subdirectory(HopsanGUI)
add_subdirectory(HopsanGenerator)
add_subdirectory(hopsangeneratorgui)
add_subdirectory(hopsanhdf5exporter)
add_subdirectory(hopsanremote)
add_subdirectory(Ops)
add_subdirectory(SymHop)
add_subdirectory(UnitTests)
add_subdirectory(hopsanc)
# Install various files and directories
install(FILES Hopsan-release-notes.txt
README.md
DESTINATION .)
install(DIRECTORY Scripts
DESTINATION .)
install(DIRECTORY dependencies/tools/7z
DESTINATION dependencies/tools)
install(DIRECTORY "Models/Benchmark Models"
"Models/Component Test"
"Models/Example Models"
DESTINATION Models)
# Install Qt and C++ runtime
if (WIN32)
file(TO_CMAKE_PATH "$ENV{qmake_path}" qt_home_bin)
message(STATUS "Installing from QT directory: ${qt_home_bin}")
install(FILES ${qt_home_bin}/Qt5Core.dll
${qt_home_bin}/Qt5Gui.dll
${qt_home_bin}/Qt5Network.dll
${qt_home_bin}/Qt5OpenGL.dll
${qt_home_bin}/Qt5Widgets.dll
${qt_home_bin}/Qt5Sql.dll
${qt_home_bin}/Qt5Svg.dll
${qt_home_bin}/Qt5Xml.dll
${qt_home_bin}/Qt5Test.dll
${qt_home_bin}/Qt5PrintSupport.dll
DESTINATION bin)
install(FILES ${qt_home_bin}/../plugins/iconengines/qsvgicon.dll
DESTINATION bin/iconengines)
install(FILES ${qt_home_bin}/../plugins/imageformats/qjpeg.dll
${qt_home_bin}/../plugins/imageformats/qsvg.dll
DESTINATION bin/imageformats)
install(FILES ${qt_home_bin}/../plugins/platforms/qwindows.dll
DESTINATION bin/platforms)
if (MINGW)
file(TO_CMAKE_PATH "$ENV{mingw_path}" mingw_home_bin)
message(STATUS "Installing from MinGW directory: ${mingw_home_bin}")
install(FILES ${qt_home_bin}/Qt5WebKit.dll
${qt_home_bin}/Qt5WebKitWidgets.dll
${qt_home_bin}/libicuin56.dll
${qt_home_bin}/libicuuc56.dll
${qt_home_bin}/libicudt56.dll
${qt_home_bin}/libeay32.dll
${qt_home_bin}/ssleay32.dll
${mingw_home_bin}/libgcc_s_seh-1.dll
${mingw_home_bin}/libstdc++-6.dll
${mingw_home_bin}/libwinpthread-1.dll
DESTINATION bin)
endif()
endif()