Skip to content

Commit 070d6ab

Browse files
committed
Ensure OpenGL::GL target is found when using config module
1 parent 5e8f8fb commit 070d6ab

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,10 @@ install(TARGETS ImGui-SFML
133133
install(EXPORT ImGui-SFML
134134
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/ImGui-SFML
135135
NAMESPACE ImGui-SFML::
136-
FILE ImGui-SFMLConfig.cmake
136+
)
137+
138+
install(FILES ${PROJECT_SOURCE_DIR}/cmake/ImGui-SFMLConfig.cmake
139+
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/ImGui-SFML
137140
)
138141

139142
# Stop configuration if being consumed by a higher level project

cmake/ImGui-SFMLConfig.cmake

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
include(CMakeFindDependencyMacro)
2+
find_dependency(OpenGL)
3+
find_dependency(SFML COMPONENTS Graphics)
4+
5+
include(${CMAKE_CURRENT_LIST_DIR}/ImGui-SFML.cmake)

0 commit comments

Comments
 (0)