Skip to content

FindOpenSceneGraph: Fix find in Debug

cyrilBoucher requested to merge cyrilBoucher/cmake:bug/find-osg-debug into master

FindOpenSceneGraph: Fix find in Debug

As of now, it is not possible to find OpenSceneGraph in Debug because the only variable find_package_handle_standard_args is checking is ${module}_LIBRARY while the debug library is in ${module}_LIBRARY_DEBUG. The refactoring gets rid of the old behaviour to replace with a call to select_library_configurations which will populated ${module}_LIBRARY accordingly.

[Modules/Findosg_functions.cmake Modules/FindOpenThreads.cmake]

  • Include SelectLibraryConfigurations module
  • Modify the name of the variable that will be populated by the first find_library to ${MODULE}_LIBRARY_RELEASE so that SelectLibraryConfigurations can act on it
  • Add call to select_library_configurations after attempting to find libraries in debug and release

Topic-rename: FindOpenSceneGraph-debug

Edited by Brad King

Merge request reports