Skip to content

Commit

Permalink
restore package config file
Browse files Browse the repository at this point in the history
  • Loading branch information
fredroy committed Nov 17, 2023
1 parent 9387ad6 commit 59442e0
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 8 deletions.
37 changes: 31 additions & 6 deletions applications/plugins/image/imageConfig.cmake.in
Original file line number Diff line number Diff line change
@@ -1,13 +1,38 @@
# CMake package configuration file for the plugin @PROJECT_NAME@

@PACKAGE_GUARD@
@PACKAGE_INIT@

set(IMAGE_HAVE_SOFA_GL @IMAGE_HAVE_SOFA_GL@)
set(IMAGE_HAVE_SOFA_GUI_QT @IMAGE_HAVE_SOFA_GUI_QT@)
set(IMAGE_HAVE_SOFAPYTHON @IMAGE_HAVE_SOFAPYTHON@)
set(IMAGE_HAVE_MULTITHREADING @IMAGE_HAVE_MULTITHREADING@)
set(IMAGE_HAVE_ZLIB @IMAGE_HAVE_ZLIB@)
set(IMAGE_HAVE_FREENECT @IMAGE_HAVE_FREENECT@)

find_package(Sofa.Core QUIET REQUIRED)
sofa_find_package(Sofa.Component.Visual QUIET REQUIRED)
find_package(Sofa.Component.Visual QUIET REQUIRED)


if(IMAGE_HAVE_SOFA_GL)
find_package(Sofa.GL QUIET REQUIRED)
endif()
if(IMAGE_HAVE_SOFAGUIQT)
find_package(Sofa.GUI.Qt QUIET REQUIRED)
endif()
if(IMAGE_HAVE_SOFAPYTHON)
find_package(SofaPython QUIET REQUIRED)
endif()
if(IMAGE_HAVE_MULTITHREADING)
find_package(MultiThreading QUIET REQUIRED)
endif()
if(IMAGE_HAVE_ZLIB)
find_package(ZLIB QUIET REQUIRED)
endif()
if(IMAGE_HAVE_FREENECT)
find_package(Freenect QUIET REQUIRED)
endif()

if(NOT TARGET @PROJECT_NAME@)
include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@Targets.cmake")
if(NOT TARGET image)
include("${CMAKE_CURRENT_LIST_DIR}/imageTargets.cmake")
endif()

check_required_components(@PROJECT_NAME@)
check_required_components(image)
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ if (NOT Qt5Core_FOUND)
find_package(Qt6 COMPONENTS Core CoreTools REQUIRED QUIET)
if (Qt6Core_FOUND)
qt6_wrap_cpp(MOC_FILES ${MOC_HEADER_FILES})
# message(FATAL_ERROR "Image_gui is not compatible with Qt6 yet.") # to remove once image_gui has been updated
message(FATAL_ERROR "Image_gui is not compatible with Qt6 yet.") # to remove once image_gui has been updated
endif()
# else() should never happened as it would already break in Sofa.GUI.Qt
endif()
Expand Down
2 changes: 1 addition & 1 deletion applications/plugins/image/src/image/initImage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include <sofa/helper/system/PluginManager.h>
#include <sofa/helper/logging/Messaging.h>

#include <CImgPlugin/SOFACImg.h>
#include <cimg/SOFACImg.h>

#if IMAGE_HAVE_SOFAPYTHON
#include <SofaPython/PythonFactory.h>
Expand Down

0 comments on commit 59442e0

Please sign in to comment.