Skip to content

Commit

Permalink
[3rdparty] Make dependencies more flatpak-friendly
Browse files Browse the repository at this point in the history
  • Loading branch information
jcelerier committed Jul 1, 2024
1 parent 46e3b15 commit 383c244
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 12 deletions.
2 changes: 1 addition & 1 deletion 3rdparty/libremidi
2 changes: 1 addition & 1 deletion 3rdparty/oscpack
2 changes: 1 addition & 1 deletion 3rdparty/rapidfuzz-cpp
2 changes: 2 additions & 0 deletions cmake/deps/coap.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ if(NOT TARGET libcoap::coap-3)
set(_oldmode ${BUILD_SHARED_LIBS})
set(BUILD_SHARED_LIBS OFF)

set(ENABLE_WS ON)
set(ENABLE_WS ON CACHE INTERNAL "")
set(ENABLE_DTLS OFF)
set(ENABLE_DTLS OFF CACHE INTERNAL "")
set(ENABLE_EXAMPLES OFF)
Expand Down
22 changes: 13 additions & 9 deletions cmake/deps/re2.cmake
Original file line number Diff line number Diff line change
@@ -1,15 +1,19 @@
if(OSSIA_USE_SYSTEM_LIBRARIES)
find_library(RE2_LIBRARY NAMES re2)
find_path(RE2_INCLUDE_DIR re2/re2.h)
find_package(re2 QUIET CONFIG)
if(NOT TARGET re2::re2)
message(FATAL_ERROR yo)
find_library(RE2_LIBRARY NAMES re2)
find_path(RE2_INCLUDE_DIR re2/re2.h)

if(NOT RE2_LIBRARY OR NOT RE2_INCLUDE_DIR)
message(FATAL_ERROR "re2 is required")
endif()
add_library(re2 INTERFACE IMPORTED GLOBAL)
add_library(re2::re2 ALIAS re2)
if(NOT RE2_LIBRARY OR NOT RE2_INCLUDE_DIR)
message(FATAL_ERROR "re2 is required")
endif()
add_library(re2 INTERFACE IMPORTED GLOBAL)
add_library(re2::re2 ALIAS re2)

target_include_directories(re2 SYSTEM INTERFACE "${RE2_INCLUDE_DIR}")
target_link_libraries(re2 INTERFACE "${RE2_LIBRARY}")
target_include_directories(re2 SYSTEM INTERFACE "${RE2_INCLUDE_DIR}")
target_link_libraries(re2 INTERFACE "${RE2_LIBRARY}")
endif()
else()
add_library(re2 STATIC
${OSSIA_3RDPARTY_FOLDER}/re2/re2/bitmap256.cc
Expand Down

0 comments on commit 383c244

Please sign in to comment.