Permalink
Browse files

FindBrlAPI.cmake

  • Loading branch information...
mlang committed Jul 22, 2017
1 parent 280822e commit 0352bad0fea6b00d40fdb401e6d747ca68fcbbf5
Showing with 42 additions and 2 deletions.
  1. +38 −0 cmake/FindBrlAPI.cmake
  2. +3 −2 lib/CMakeLists.txt
  3. +1 −0 lib/brlapi.hpp
View
@@ -0,0 +1,38 @@
#.rst:
# FindBrlAPI
# ----------
#
# Find BrlAPI library
#
#=============================================================================
include(FeatureSummary)
set_package_properties(BrlAPI PROPERTIES
URL "http://www.brltty.com/"
DESCRIPTION "Braille displays")
find_path(BrlAPI_INCLUDE_DIR NAMES brlapi.h)
find_library(BrlAPI_LIBRARY NAMES brlapi)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(BrlAPI
REQUIRED_VARS BrlAPI_LIBRARY BrlAPI_INCLUDE_DIR
)
mark_as_advanced(BrlAPI_LIBRARY BrlAPI_INCLUDE_DIR)
if(BrlAPI_FOUND)
set(BrlAPI_LIBRARIES "${BrlAPI_LIBRARY}")
set(BrlAPI_INCLUDE_DIRS "${BrlAPI_INCLUDE_DIR}")
add_library(BrlAPI SHARED IMPORTED)
if(BrlAPI_INCLUDE_DIR)
set_target_properties(BrlAPI PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${BrlAPI_INCLUDE_DIRS}"
)
endif()
if(EXISTS "${BrlAPI_LIBRARY}")
set_target_properties(BrlAPI PROPERTIES
IMPORTED_LINK_INTERFACE_LANGUAGES "C"
IMPORTED_LOCATION "${BrlAPI_LIBRARY}"
)
endif()
endif()
View
@@ -1,5 +1,6 @@
find_package(BrlAPI REQUIRED)
find_package(JACK REQUIRED)
add_subdirectory(GSL)
add_library(IO jack.cpp brlapi.cpp)
target_link_libraries(IO PUBLIC GSL PRIVATE JACK brlapi)
add_library(IO brlapi.cpp jack.cpp)
target_link_libraries(IO PUBLIC GSL PRIVATE JACK BrlAPI)
target_include_directories(IO INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}")
View
@@ -41,6 +41,7 @@ inline std::ostream &operator<<(std::ostream &Out, DisplaySize const &Size) {
class Connection {
class Implementation;
std::unique_ptr<Implementation> BrlAPI;
public:
Connection();
~Connection();

0 comments on commit 0352bad

Please sign in to comment.