ENDIF(CREA_VERBOSE_CMAKE)
#-----------------------------------------------------------------------------
-# If crea was compiled with WxWidget or vtk then have to find them : for now forced (see root CMakeLists.txt)
+# If crea was compiled with WxWidget or vtk then have to find them
IF(CREA_BUILT_WITH_WX OR CREA_BUILT_WITH_VTK)
INCLUDE(${CREA_CMAKE_DIR}/CREAMacro_Define.cmake)
ENDIF(CREA_BUILT_WITH_WX OR CREA_BUILT_WITH_VTK)
IF(CREA_BUILT_WITH_WX)
- MESSAGE(STATUS "=======================================")
- MESSAGE(STATUS "crea was built with wxWidgets: have to find it...")
- INCLUDE(${CREA_CMAKE_DIR}/CREAMacro_FindAndUseWxWidgets.cmake)
- CREA_FIND_AND_USE_WXWIDGETS()
+ IF(NOT wxWidgets_FOUND)
+ MESSAGE(STATUS "=======================================")
+ MESSAGE(STATUS "crea was built with wxWidgets: have to find it...")
+ INCLUDE(${CREA_CMAKE_DIR}/CREAMacro_FindAndUseWxWidgets.cmake)
+ CREA_FIND_AND_USE_WXWIDGETS()
+ ENDIF(NOT wxWidgets_FOUND)
ENDIF(CREA_BUILT_WITH_WX)
IF(CREA_BUILT_WITH_VTK)
- MESSAGE(STATUS "=======================================")
- MESSAGE(STATUS "crea was built with VTK: have to find it...")
- INCLUDE(${CREA_CMAKE_DIR}/CREAMacro_FindAndUseVTK.cmake)
- CREA_FIND_AND_USE_VTK()
+ IF (NOT VTK_FOUND)
+ MESSAGE(STATUS "=======================================")
+ MESSAGE(STATUS "crea was built with VTK: have to find it...")
+ INCLUDE(${CREA_CMAKE_DIR}/CREAMacro_FindAndUseVTK.cmake)
+ CREA_FIND_AND_USE_VTK()
+ ENDIF (NOT VTK_FOUND)
ENDIF(CREA_BUILT_WITH_VTK)