From abe2c5bd6652814a0bd54f9f51522fce9f9bad5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Thu, 24 Mar 2016 14:07:27 +0100 Subject: [PATCH] modules: fix root library finding for superprojects. Will this never end?! --- modules/FindMagnum.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/FindMagnum.cmake b/modules/FindMagnum.cmake index 3c3cdacb4..24699091a 100644 --- a/modules/FindMagnum.cmake +++ b/modules/FindMagnum.cmake @@ -285,6 +285,8 @@ if(NOT TARGET Magnum::Magnum) # TODO: give me INTERFACE_LINK_OPTIONS or something, please set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -s USE_WEBGL2=1") endif() +else() + set(MAGNUM_LIBRARY Magnum::Magnum) endif() # Ensure that all inter-component dependencies are specified as well @@ -608,7 +610,7 @@ endforeach() # Complete the check with also all components include(FindPackageHandleStandardArgs) find_package_handle_standard_args(Magnum - REQUIRED_VARS MAGNUM_LIBRARY MAGNUM_INCLUDE_DIR + REQUIRED_VARS MAGNUM_INCLUDE_DIR MAGNUM_LIBRARY HANDLE_COMPONENTS) # Create Windowless*Application, *Application and *Context aliases