summaryrefslogtreecommitdiff
path: root/sci-visualization/scidavis/files/scidavis-muparser.patch
blob: 1b8c994bc74e6c91a14a80b451a167d6c91308a3 (plain)
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
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1b75dcc..f6c730a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,4 +1,5 @@
 cmake_minimum_required( VERSION 3.16 )
+include(GNUInstallDirs)
 
 # Target platform is Windows 10
 if( CMAKE_GENERATOR STREQUAL "Visual Studio 15 2017" OR
@@ -115,6 +116,7 @@ find_package( ZLIB "1.2.11" REQUIRED )
 find_package( OpenGL COMPONENTS OpenGL REQUIRED )
 
 # muParser
+if( SCRIPTING_MUPARSER )
 find_library( MUPARSER_LIB
   NAMES muparser
   REQUIRED
@@ -124,6 +126,7 @@ find_path( MUPARSER_INCLUDE_DIR
   REQUIRED
   )
 message( STATUS "Found muParser : ${MUPARSER_LIB} include: ${MUPARSER_INCLUDE_DIR}" )
+endif()
 
 add_subdirectory( 3rdparty )
 
@@ -149,7 +152,7 @@ set( DOC_FILES
 if( WIN32 )
   install( FILES ${DOC_FILES} DESTINATION . )
 else()
-  install( FILES ${DOC_FILES} DESTINATION share/doc/scidavis )
+  install( FILES ${DOC_FILES} DESTINATION ${CMAKE_INSTALL_DOCDIR} )
 endif()
 
 if( MSVC )
diff --git a/scidavis/CMakeLists.txt b/scidavis/CMakeLists.txt
index cc68d4d..fb6da42 100644
--- a/scidavis/CMakeLists.txt
+++ b/scidavis/CMakeLists.txt
@@ -127,15 +127,18 @@ if (NOT CMAKE_CROSS_COMPILING)
       install( FILES scidavis.desktop DESTINATION share/applications )
       install( FILES scidavis.xml DESTINATION share/mime/packages )
       install( FILES scidavis.1 DESTINATION share/man/man1 )
-      install( FILES scidavis.appdata.xml DESTINATION share/appdata )
+      install( FILES scidavis.appdata.xml DESTINATION share/metainfo )
       install( FILES x-sciprj.desktop DESTINATION share/mimelnk/application )
     endif()
     
     if( SCRIPTING_PYTHON )
+      if(NOT PYTHON_SCRIPTDIR)
+        set(PYTHON_SCRIPTDIR etc)
+      endif()
       if( MULTI_CONFIG )
-        install( FILES scidavisrc.py ${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/scidavisrc.pyc DESTINATION etc )
+        install( FILES scidavisrc.py ${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/scidavisrc.pyc DESTINATION ${PYTHON_SCRIPTDIR} )
       else()
-        install( FILES scidavisrc.py ${CMAKE_CURRENT_BINARY_DIR}/scidavisrc.pyc DESTINATION etc )
+        install( FILES scidavisrc.py ${CMAKE_CURRENT_BINARY_DIR}/scidavisrc.pyc DESTINATION ${PYTHON_SCRIPTDIR} )
       endif()
       install( FILES scidavisUtil.py DESTINATION share/scidavis )
     endif()