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
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()
#=========================================================
#=========================================================
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}
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}
endif(COMMAND cmake_policy)
#=========================================================
+
#=========================================================
#List of vv tools to compile
SET(vv_TOOLS
#=========================================================
# Qt related commands
FIND_PACKAGE(Qt4 REQUIRED)
+LINK_DIRECTORIES(${QT_LIBRARY_DIR})
+
QT4_WRAP_CPP(vv_SRCS
vvMainWindowBase.h
../segmentation
)
-LINK_DIRECTORIES(${QT_LIBRARY_DIR})
-
#=========================================================
#Add each tool's dependencies
foreach(tool ${vv_TOOLS})
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})