You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# basically overrides the find_package to not find anything
# for stuff we're including locally
set(as_subproject IlmBase OpenEXR)
macro(find_package)
if(NOT"${ARGV0}"IN_LIST as_subproject)
_find_package(${ARGV})
endif()
endmacro()
You override find_package, that is not supported officially by cmake and might be removed in future versions, and one can only do so once, hence if there are more than one project doing it in the same build it will fail.
A better solution is to have your subproject create a "dummy" FindFoo.cmake and put that in a directory at the beginning of the CMAKE_MODULE_PATH, then that dummy package will get found by the find_package(Foo) and then target_link_libraries will work as normally.
I can provide a PR if you want.
The text was updated successfully, but these errors were encountered:
In
openexr/CMakeLists.txt
Lines 28 to 36 in 2600cdc
You override find_package, that is not supported officially by cmake and might be removed in future versions, and one can only do so once, hence if there are more than one project doing it in the same build it will fail.
A better solution is to have your subproject create a "dummy" FindFoo.cmake and put that in a directory at the beginning of the CMAKE_MODULE_PATH, then that dummy package will get found by the find_package(Foo) and then target_link_libraries will work as normally.
I can provide a PR if you want.
The text was updated successfully, but these errors were encountered: