]> Creatis software - cpPlugins.git/commitdiff
Some project updates
authorLeonardo Florez-Valencia <florez-l@javeriana.edu.co>
Wed, 28 Jan 2015 19:04:42 +0000 (14:04 -0500)
committerLeonardo Florez-Valencia <florez-l@javeriana.edu.co>
Wed, 28 Jan 2015 19:04:42 +0000 (14:04 -0500)
CMakeLists.txt
appli/ImageMPR/CMakeLists.txt
lib/cpPlugins/Plugins/CMakeLists.txt
lib/third_party/Pluma/CMakeLists.txt

index 9918041f12ae7906d6b7d72a2cd1474bdc4223bf..fc0442238b259aca44a3e6c2eab0996ca18c745d 100644 (file)
@@ -21,20 +21,24 @@ ENDIF(
 ## ================
 
 PROJECT(cpPlugins)
-SET(cpPlugins_MAJOR_VERSION   "0")
-SET(cpPlugins_MINOR_VERSION   "0")
-SET(cpPlugins_RELEASE_VERSION "1")
-SET(cpPlugins_VERSION "${cpPlugins_MAJOR_VERSION}.${cpPlugins_MINOR_VERSION}.${cpPlugins_RELEASE_VERSION}")
+SET(prj_MAJOR_VERSION   "0")
+SET(prj_MINOR_VERSION   "0")
+SET(prj_RELEASE_VERSION "1")
+SET(
+  prj_VERSION
+  "${prj_MAJOR_VERSION}.${prj_MINOR_VERSION}.${prj_RELEASE_VERSION}"
+  )
 
 ## ===========
 ## = Options =
 ## ===========
 
+OPTION(USE_QT4 "Build Qt4-based code" OFF)
 OPTION(BUILD_EXAMPLES "Build examples" OFF)
 
-## ============
-## = Packages =
-## ============
+## ========================
+## = Packages and options =
+## ========================
 
 INCLUDE(GenerateExportHeader)
 
@@ -44,13 +48,28 @@ INCLUDE(${ITK_USE_FILE})
 FIND_PACKAGE(VTK REQUIRED)
 INCLUDE(${VTK_USE_FILE})
 
-IF(BUILD_EXAMPLES)
-  OPTION(USE_QT4 "Build Qt4-based examples" OFF)
-  IF(USE_QT4)
+IF(USE_QT4)
+  FIND_LIBRARY(
+    VTK_USES_QT
+    NAMES vtkGUISupportQt-${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION}
+    HINTS ${VTK_LIBRARY_DIRS}
+    PATHS /usr/lib /usr/local/lib /usr/lib64 /usr/local/lib64
+    )
+  FIND_LIBRARY(
+    VTK_USES_QT_OPENGL
+    vtkGUISupportQtOpenGL-${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION}
+    HINTS ${VTK_LIBRARY_DIRS}
+    PATHS /usr/lib /usr/local/lib /usr/lib64 /usr/local/lib64
+    )
+  MARK_AS_ADVANCED(FORCE VTK_USES_QT)
+  MARK_AS_ADVANCED(FORCE VTK_USES_QT_OPENGL)
+  IF(VTK_USES_QT AND VTK_USES_QT_OPENGL)
     FIND_PACKAGE(Qt4 REQUIRED)
     INCLUDE(${QT_USE_FILE})
-  ENDIF(USE_QT4)
-ENDIF(BUILD_EXAMPLES)
+  ELSE(VTK_USES_QT AND VTK_USES_QT_OPENGL)
+    MESSAGE(FATAL_ERROR "VTK ${VTK_MAJOR_VERSION}.${VTK_MINOR_VERSION} was not compiled with Qt4 support!")
+  ENDIF(VTK_USES_QT AND VTK_USES_QT_OPENGL)
+ENDIF(USE_QT4)
 
 ## ================================================
 ## = Do not allow to build inside the source tree =
index 5660c19b7f205b0cf3dfbc0d3f0d0f566716b422..56b4f3847de2fe1e34d166c8786af7e477bb7a19 100644 (file)
@@ -60,7 +60,6 @@ IF(USE_QT4)
     cpPlugins_Interface
     ${QT_LIBRARIES}
     vtkGUISupportQt
-
     )
 ENDIF(USE_QT4)
 
index 372b1504dbb12cfb3f07cc48392fff9958a773ea..d32fafbaecc7e9b307118c558ae385962fe5eb43 100644 (file)
@@ -32,7 +32,6 @@ GENERATE_EXPORT_HEADER(
 TARGET_LINK_LIBRARIES(
   ${LIBRARY_NAME}
   cpPlugins_Interface
-  ${ITK_LIBRARIES}
   )
 
 ## eof - $RCSfile$
index 9a86949bb35a7b4d009c2603aff2dd0f1055e0c3..da0147b3c5f78541c3be2a50ec8abab83cc597a5 100644 (file)
@@ -26,7 +26,7 @@ GENERATE_EXPORT_HEADER(
   ${LIBRARY_NAME}
   BASE_NAME ${LIBRARY_NAME}
   EXPORT_MACRO_NAME ${LIBRARY_NAME}_EXPORT
-  EXPORT_FILE_NAME ${PROJECT_BINARY_DIR}/lib/third_party/Pluma/${LIBRARY_NAME}_Export.h
+  EXPORT_FILE_NAME  ${PROJECT_BINARY_DIR}/lib/third_party/Pluma/${LIBRARY_NAME}_Export.h
   STATIC_DEFINE ${LIBRARY_NAME}_BUILT_AS_STATIC
   )
 IF(NOT WIN32)