]> Creatis software - clitk.git/commitdiff
COMP: First Mac 10.9 build fixes.
authorHans Johnson <hans-johnson@uiowa.edu>
Thu, 5 Jun 2014 14:43:10 +0000 (09:43 -0500)
committerHans Johnson <hans-johnson@uiowa.edu>
Thu, 5 Jun 2014 15:48:08 +0000 (10:48 -0500)
This patch probably includes a few items that are
not strictly necessary, but during the fumbling
around to find a working solution, these
were the identified failures.

Updating VTK and ITK were key components to
make this process work.

make_new_tool.sh
superbuild/CMakeLists.txt
vv/CMakeLists.txt

index a616e768b1dab7401ad195d304b366072099dbb6..24f914e2d3e02a4036ec84a216d2add38035313e 100755 (executable)
@@ -12,6 +12,8 @@ do
     cp $i ${i/FooImage/$1}
     if test "$(uname)" = "Darwin"
     then
+        echo $(pwd)
+        echo sed -i "" "s/FooImage/$1/g" ${i/FooImage/$1}
         sed -i "" "s/FooImage/$1/g" ${i/FooImage/$1}
     else
         sed -i "s/FooImage/$1/ig" ${i/FooImage/$1}
index c90b2867ef6f76f35439dac053193ea0c12913de..1a44162a36ed6435dc0c5df239dc7a05ced39712 100644 (file)
@@ -38,15 +38,21 @@ set(install_prefix ${base}/Install)
 
 find_package(Git REQUIRED)
 
+if( 1 EQUAL 1)
 #=========================================================
 # QT
+if(WIN32)
 SET(QtWinSpecFiles "${source_prefix}/qt/mkspecs/win32-msvc2003/qmake.conf;${source_prefix}/qt/mkspecs/win32-msvc2005/qmake.conf;${source_prefix}/qt/mkspecs/win32-msvc2008/qmake.conf;${source_prefix}/qt/mkspecs/win32-msvc2010/qmake.conf")
+set(WINPATCH "sed -i \"s/\\-MD/-MT/g\" ${QtWinSpecFiles}")
+else()
+set(WINPATCH "")
+endif()
 ExternalProject_Add(
   QT
   SOURCE_DIR ${source_prefix}/qt
   GIT_REPOSITORY git://gitorious.org/qt/qt.git
-  GIT_TAG v4.8.3
-  PATCH_COMMAND sed -i "s/\\-MD/-MT/g" ${QtWinSpecFiles}
+  GIT_TAG v4.8.6
+  PATCH_COMMAND ${WINPATCH}
   CONFIGURE_COMMAND ${source_prefix}/qt/configure -confirm-license
                                                   -static 
                                                   -fast
@@ -63,6 +69,12 @@ ExternalProject_Add(
   INSTALL_COMMAND ""
 )
 SET(qmake_executable "${build_prefix}/QT/bin/qmake")
+set(VTK_DEPEND_QT QT)
+
+else()
+  find_package(qt4 REQUIRED)
+  set(VTK_DEPEND_QT "")
+endif()
 #=========================================================
 
 #=========================================================
@@ -73,10 +85,10 @@ IF(MSVC)
 ENDIF(MSVC)
 ExternalProject_Add(
   VTK 
-  DEPENDS QT
+  DEPENDS ${VTK_DEPEND_QT}
   SOURCE_DIR ${source_prefix}/vtk
   GIT_REPOSITORY git://vtk.org/VTK.git
-  GIT_TAG v5.10.1
+  GIT_TAG release-5.10
   INSTALL_COMMAND ""
   CMAKE_ARGS
     -DQT_QMAKE_EXECUTABLE:FILEPATH=${qmake_executable}
@@ -168,7 +180,7 @@ endif(MSVC)
 
 ExternalProject_Add(
   VV
-  DEPENDS QT VTK ITK GDCM
+  DEPENDS ${VTK_DEPEND_QT} VTK ITK GDCM
   SOURCE_DIR ${source_prefix}/vv
   GIT_REPOSITORY git://git.creatis.insa-lyon.fr/clitk
   INSTALL_DIR ${install_prefix}
index 98955708a30d5b09d0ae0f0f96d63776ad2981bd..e5e20f97d30f5a5799d8c2e2fef961192e01db77 100644 (file)
@@ -7,6 +7,7 @@ if(COMMAND cmake_policy)
 endif(COMMAND cmake_policy)
 #=========================================================
 
+
 #=========================================================
 #List of vv tools to compile
 SET(vv_TOOLS
@@ -106,6 +107,8 @@ SET(vv_SRCS
 #=========================================================
 # Qt related commands
 FIND_PACKAGE(Qt4 REQUIRED)
+LINK_DIRECTORIES(${QT_LIBRARY_DIR})
+
 
 QT4_WRAP_CPP(vv_SRCS 
   vvMainWindowBase.h 
@@ -194,8 +197,6 @@ INCLUDE_DIRECTORIES(
   ../segmentation
   )
 
-LINK_DIRECTORIES(${QT_LIBRARY_DIR})
-
 #=========================================================
 #Add each tool's dependencies
 foreach(tool ${vv_TOOLS})
@@ -217,9 +218,25 @@ IF(CLITK_EXPERIMENTAL)
 ENDIF(CLITK_EXPERIMENTAL)
 #=========================================================
 
+#-----------------------------------------------------------------------------
+# Avoid linker bug in Mac OS 10.5
+# See http://wiki.finkproject.org/index.php/Fink:Packaging:Preparing_for_10.5#OpenGL_Bug
+#
+if(APPLE)
+  FIND_LIBRARY(CoreFoundation_LIBRARY CoreFoundation REQUIRED)
+  FIND_LIBRARY(ApplicationServices_LIBRARY ApplicationServices REQUIRED)
+  FIND_LIBRARY(SystemConfiguration_LIBRARY SystemConfiguration REQUIRED)
+  FIND_LIBRARY(Security_LIBRARY Security REQUIRED)
+  set(APPLE_FRAMEWORKS ${CoreFoundation_LIBRARY} 
+    ${ApplicationServices_LIBRARY} 
+    ${SystemConfiguration_LIBRARY}
+    ${Security_LIBRARY}
+    )
+  message(STATUS "===== ${APPLE_FRAMEWORKS}")
+endif()
 #=========================================================
 #Create binary and libs for tests
-SET(vvExternalLibs ${QT_QTNETWORK_LIBRARY} clitkSegmentationGgoLib ${toolLibs} ${foundationLibraries} ${vvCxImage})
+SET(vvExternalLibs clitkSegmentationGgoLib ${toolLibs} ${foundationLibraries} ${vvCxImage} ${QT_LIBRARIES} ${QT_QTNETWORK_LIBRARY} ${APPLE_FRAMEWORKS})
 # QtNetwork is required by vvRegisterForm
 
 ADD_LIBRARY(vvLib ${vv_SRCS} ${vv_UI_CXX})