Sfoglia il codice sorgente

Mac debugging, OSX doesn't like VTK 6 dependency for varying minor versions.

enhancement_3
Trevor Irons 8 anni fa
parent
commit
ab817dbe80
2 ha cambiato i file con 20 aggiunte e 15 eliminazioni
  1. 17
    13
      CMakeLists.txt
  2. 3
    2
      LemmaCore/CMakeLists.txt

+ 17
- 13
CMakeLists.txt Vedi File

@@ -43,18 +43,22 @@ ExternalProject_Add(TINYXML2
43 43
     CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX}
44 44
 )
45 45
 
46
-# matio, this library is used for MATLAB file IO
47
-ExternalProject_ADD(MATIO
48
-	GIT_REPOSITORY  "git://git.code.sf.net/p/matio/matio"
49
-	GIT_TAG  "master"
50
-	UPDATE_COMMAND ""
51
-	PATCH_COMMAND ""
52
-    PREFIX ${CMAKE_CURRENT_BINARY_DIR}/external/matio
53
-    #CONFIGURE_COMMAND ${CMAKE_CURRENT_BINARY_DIR}/external/matio/src/MATIO/autogen.sh && configure
54
-    CONFIGURE_COMMAND ./autogen.sh && ./configure --prefix=${CMAKE_INSTALL_PREFIX}
55
-	BUILD_IN_SOURCE 1 
56
-    BUILD_COMMAND ${MAKE}
57
-)
46
+option(MATIO_SUPPORT  "MATIO library support for MATLAB .mat files" ON)
47
+
48
+if ( MATIO_SUPPORT )
49
+	# matio, this library is used for MATLAB file IO
50
+	ExternalProject_ADD(MATIO
51
+		GIT_REPOSITORY  "git://git.code.sf.net/p/matio/matio"
52
+		GIT_TAG  "master"
53
+		UPDATE_COMMAND ""
54
+		PATCH_COMMAND ""
55
+    	PREFIX ${CMAKE_CURRENT_BINARY_DIR}/external/matio
56
+    	#CONFIGURE_COMMAND ${CMAKE_CURRENT_BINARY_DIR}/external/matio/src/MATIO/autogen.sh && configure
57
+    	CONFIGURE_COMMAND ./autogen.sh && ./configure --prefix=${CMAKE_INSTALL_PREFIX}
58
+		BUILD_IN_SOURCE 1 
59
+    	BUILD_COMMAND ${MAKE}
60
+	)
61
+endif()
58 62
 
59 63
 #####################
60 64
 # Lemma Configuration
@@ -62,7 +66,7 @@ ExternalProject_ADD(MATIO
62 66
 project(LEMMA_CXX)
63 67
 
64 68
 # We don't Build VTK, it is too much. 
65
-find_package(VTK 6.0 REQUIRED NO_MODULE)
69
+find_package(VTK 6 REQUIRED NO_MODULE)
66 70
 include(${VTK_USE_FILE})
67 71
 
68 72
 set(LEMMA_VERSION_MAJOR "0")

+ 3
- 2
LemmaCore/CMakeLists.txt Vedi File

@@ -18,7 +18,8 @@ add_library( lemmacore ${SOURCE} )
18 18
 
19 19
 add_dependencies(lemmacore YAML-CPP)
20 20
 add_dependencies(lemmacore TINYXML2)
21
-add_dependencies(lemmacore MATIO)
22
-
21
+if (MATIO_SUPPORT)
22
+	add_dependencies(lemmacore MATIO)
23
+endif()
23 24
 target_link_libraries(lemmacore ${VTK_LIBRARIES})
24 25
 target_link_libraries(lemmacore "yaml-cpp")

Loading…
Annulla
Salva