Skip to content

Commit

Permalink
Merge pull request #20 from paullouisageneau/cmake-add-findlibjuice
Browse files Browse the repository at this point in the history
CMake: Add FindLibJuice module
  • Loading branch information
paullouisageneau authored Jun 14, 2024
2 parents 977cbe8 + e687994 commit 1dc1b22
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions cmake/Modules/FindLibJuice.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
if (NOT TARGET LibJuice::LibJuice)
find_path(JUICE_INCLUDE_DIR juice/juice.h)
find_library(JUICE_LIBRARY NAMES juice)

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(LibJuice DEFAULT_MSG JUICE_LIBRARY JUICE_INCLUDE_DIR)

if (LibJuice_FOUND)
add_library(LibJuice::LibJuice UNKNOWN IMPORTED)
set_target_properties(LibJuice::LibJuice PROPERTIES
IMPORTED_LOCATION "${JUICE_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${JUICE_INCLUDE_DIRS}"
INTERFACE_LINK_LIBRARIES "${JUICE_LIBRARIES}"
IMPORTED_LINK_INTERFACE_LANGUAGES "C")
endif ()
endif ()

0 comments on commit 1dc1b22

Please sign in to comment.