Skip to content

Commit

Permalink
Look for system-wide cppgir before fallback to the bundled copy
Browse files Browse the repository at this point in the history
Closes: #282
  • Loading branch information
mymedia2 committed Aug 26, 2023
1 parent bd556e2 commit adfdeaa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 3 additions & 1 deletion external/glib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,11 @@ function(add_cppgir) # isolate scope
set(BUILD_EXAMPLES OFF)
add_subdirectory(cppgir EXCLUDE_FROM_ALL)
endfunction()
add_cppgir()

include(generate_cppgir.cmake)
if (NOT CppGir_FOUND)
add_cppgir()
endif()
generate_cppgir(external_glib Gio-2.0)

find_package(PkgConfig REQUIRED)
Expand Down
2 changes: 2 additions & 0 deletions external/glib/generate_cppgir.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
# For license and copyright information please follow this link:
# https://github.com/desktop-app/legal/blob/master/LEGAL

find_package(CppGir)

function(generate_cppgir target_name gir)
# cppgir generates all the dependent headers everytime, better to have a global folder
set(gen_dst ${CMAKE_BINARY_DIR}/gen)
Expand Down

0 comments on commit adfdeaa

Please sign in to comment.