Salome HOME
b273ca666d0d99ad0e1b50b57a3d1cdaa515fb97
[tools/configuration.git] / config / patches / solvespace.001_nogui.patch
1 diff -Naur '--exclude=CVS' '--exclude=.git' solvespace-2.1.orig/CMakeLists.txt solvespace-2.1.p1/CMakeLists.txt
2 --- solvespace-2.1.orig/CMakeLists.txt  2015-09-28 17:55:15.000000000 +0300
3 +++ solvespace-2.1.p1/CMakeLists.txt    2015-09-28 18:05:50.000000000 +0300
4 @@ -28,6 +28,10 @@
5      set(GUI gtk2 CACHE STRING "GUI toolkit to use (one of: gtk2 gtk3)")
6  endif()
7  
8 +# options
9 +
10 +option(BUILD_GUI "Build only the library part" ON)
11 +
12  # compiler
13  
14  if(WIN32)
15 @@ -54,6 +58,8 @@
16  
17  CHECK_INCLUDE_FILE("stdint.h" HAVE_STDINT_H)
18  
19 +if(BUILD_GUI)
20 +
21  find_package(OpenGL REQUIRED)
22  
23  find_package(Perl)
24 @@ -125,6 +131,8 @@
25      endif()
26  endif()
27  
28 +endif(BUILD_GUI)
29 +
30  # components
31  
32  if(WIN32)
33 diff -Naur '--exclude=CVS' '--exclude=.git' solvespace-2.1.orig/src/CMakeLists.txt solvespace-2.1.p1/src/CMakeLists.txt
34 --- solvespace-2.1.orig/src/CMakeLists.txt      2015-09-28 17:55:15.000000000 +0300
35 +++ solvespace-2.1.p1/src/CMakeLists.txt        2015-09-28 18:07:31.000000000 +0300
36 @@ -79,6 +79,8 @@
37  
38  # generated files
39  
40 +if(BUILD_GUI)
41 +
42  file(GLOB icons "${CMAKE_CURRENT_SOURCE_DIR}/icons/*.png")
43  
44  if(PERL_FOUND AND PERLMODULES_FOUND)
45 @@ -384,3 +386,5 @@
46          --malloc-fill=0xac
47          --free-fill=0xde
48          $<TARGET_FILE:solvespace>)
49 +
50 +endif(BUILD_GUI)