forked from iut-ibk/DynaMind-ToolBox
-
Notifications
You must be signed in to change notification settings - Fork 0
/
DynaMind-ToolBoxCPack_with_Python_sfcgal.txt
95 lines (82 loc) · 4.55 KB
/
DynaMind-ToolBoxCPack_with_Python_sfcgal.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
83
84
85
86
87
88
89
90
91
92
93
94
95
SET(CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION .)
INCLUDE(InstallRequiredSystemLibraries)
#CMake has a bug and does not include vcomp90.dll in system libraries
#as workaraound this dll is included in the python package for dynamind (as soon as this bug is fixed the durty workaround will be removed)
SET(CPACK_NSIS_DISPLAY_NAME "DynaMind-Toolbox")
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "DynaMind-Toolbox")
SET(CPACK_PACKAGE_NAME "DynaMind-Toolbox")
SET(CPACK_PACKAGE_VENDOR "University of Innsbruck")
SET(CPACK_PACKAGE_VERSION_MAJOR "0")
SET(CPACK_PACKAGE_VERSION_MINOR "10")
SET(CPACK_PACKAGE_VERSION_PATCH "6")
SET(CPACK_RESOURCE_FILE_LICENSE "${DynaMind-ToolBox_SOURCE_DIR}/LICENSE")
IF(WIN32 AND NOT UNIX)
SET(PYTHONBIN "" CACHE PATH "A directory which contains a complete python installation")
SET(GDALBIN "" CACHE PATH "Install dir of GDAL")
IF(NOT PYTHONBIN)
MESSAGE(FATAL_ERROR "Please set PYTHONBIN a directory which contains a complete python installation with numpy, scipy, pyqt4, reimport, gdal, netCDF4")
ENDIF()
IF(NOT GDALBIN)
MESSAGE(FATAL_ERROR "Install dir of GDAL")
ENDIF()
MESSAGE(STATUS "Boost library dirs: " ${Boost_LIBRARY_DIR})
SET(CPACK_NSIS_DISPLAY_NAME "DynaMind-Toolbox")
SET(CPACK_NSIS_HELP_LINK "http:\\\\\\\\www.dynamind-toolbox.org")
SET(CPACK_NSIS_URL_INFO_ABOUT "http:\\\\\\\\www.dynamind-toolbox.org")
SET(CPACK_NSIS_CONTACT "[email protected], [email protected]")
SET(CPACK_NSIS_EXECUTABLES_DIRECTORY .)
SET(CPACK_NSIS_EXTRA_INSTALL_COMMANDS "
!include \\\"winmessages.nsh\\\"
!define env_hklm 'HKLM \\\"SYSTEM\\\\CurrentControlSet\\\\Control\\\\Session Manager\\\\Environment\\\"'
!define env_hkcu 'HKCU \\\"Environment\\\"'
WriteRegExpandStr \\\${env_hklm} DYNAMIND_DIR $INSTDIR
SendMessage \\\${HWND_BROADCAST} \\\${WM_WININICHANGE} 0 \\\"STR:Environment\\\" /TIMEOUT=5000
WriteRegExpandStr \\\${env_hklm} DYNAMIND_PYTHON $INSTDIR\\\\lib
SendMessage \\\${HWND_BROADCAST} \\\${WM_WININICHANGE} 0 \\\"STR:Environment\\\" /TIMEOUT=5000
ClearErrors
")
FILE(GLOB DLLS
${QT_BINARY_DIR}/*.dll
${CGAL_DIR}/bin/CGAL-*-mt-*.dll
${CGAL_DIR}/bin/CGAL_ImageIO-*-mt-*.dll
${CGAL_DIR}/bin/CGAL_Core-*-mt-*.dll
${CGAL_DIR}/auxiliary/gmp/lib/*.dll
${QGLVIEWER_INCLUDE_DIR}/QGLViewer/release/QGLViewer2.dll
${Boost_LIBRARY_DIR}/boost_python-*-mt-1_*.dll
${Boost_LIBRARY_DIR}/boost_thread-*-mt-1_*.dll
${Boost_LIBRARY_DIR}/boost_chrono-*-mt-1_*.dll
${Boost_LIBRARY_DIR}/boost_graph-*-mt-1_*.dll
${Boost_LIBRARY_DIR}/boost_system-*-mt-1_*.dll
${Boost_LIBRARY_DIR}/boost_serialization-*-mt-1_*.dll
${Boost_LIBRARY_DIR}/boost_system-*-mt-1_*.dll
${Boost_LIBRARY_DIR}/boost_signals-*-mt-1_*.dll
${Boost_LIBRARY_DIR}/boost_date_time-*-mt-1_*.dll
${Boost_LIBRARY_DIR}/boost_filesystem-*-mt-1_*.dll
${Boost_LIBRARY_DIR}/boost_program_options-*-mt-1_*.dll
${DynaMind-ToolBox_BINARY_DIR}/output/Modules/swmm*.dll
${GDALBIN}/*.dll
${SFCGALBIN}/*.dll)
INSTALL (DIRECTORY "${DynaMind-ToolBox_BINARY_DIR}/output/" DESTINATION .)
INSTALL (DIRECTORY "${PYTHONBIN}/" DESTINATION .)
INSTALL (DIRECTORY "${GDALBIN}/proj/" DESTINATION .)
INSTALL (DIRECTORY "${GDALBIN}/curl/" DESTINATION .)
INSTALL (DIRECTORY "${GDALBIN}/ms/" DESTINATION .)
INSTALL (DIRECTORY "${GDALBIN}/gdal/" DESTINATION .)
INSTALL (DIRECTORY "${GDALBIN}/gdal-data/" DESTINATION .)
INSTALL(FILES ${DLLS} DESTINATION .)
FIND_PACKAGE(Qt4 REQUIRED QtSql)
MESSAGE(STATUS "QT PLUGINS DIR: " ${QT_PLUGINS_DIR})
INSTALL(FILES "${CMAKE_CURRENT_SOURCE_DIR}/qtconf/qt.conf" DESTINATION .)
INSTALL(FILES ${QT_PLUGINS_DIR}/sqldrivers/qsqlite4.dll DESTINATION plugins/sqldrivers)
if(WITH_GUI)
set(CPACK_PACKAGE_EXECUTABLES "dynamind-gui;DynaMind-Modellbuilder")
endif()
SET(CPACK_NSIS_EXTRA_UNINSTALL_COMMANDS "
WriteRegStr HKCU \\\"Software\\\\IUT\\\\DYNAMIND\\\" Editra \\\"$INSTDIR\\\\lib\\\\DynaMind\\\\3dparty\\\\Editra\\\\\\\"
DeleteRegValue \\\${env_hklm} DYNAMIND_DIR
SendMessage \\\${HWND_BROADCAST} \\\${WM_WININICHANGE} 0 \\\"STR:Environment\\\" /TIMEOUT=5000
DeleteRegValue \\\${env_hklm} DYNAMIND_PYTHON
SendMessage \\\${HWND_BROADCAST} \\\${WM_WININICHANGE} 0 \\\"STR:Environment\\\" /TIMEOUT=5000
")
ENDIF()
INCLUDE(CPack)