Find osxfuse/fuse library with CMake find_library()

This commit is contained in:
Sebastian Messmer 2016-02-14 02:38:01 +01:00
parent 7ede09877e
commit b3dc0e9b58

View File

@ -21,7 +21,9 @@ target_enable_style_warnings(${PROJECT_NAME})
target_activate_cpp14(${PROJECT_NAME})
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
target_link_libraries(${PROJECT_NAME} PRIVATE osxfuse)
else(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
target_link_libraries(${PROJECT_NAME} PRIVATE fuse)
find_library(FUSE osxfuse)
else(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
find_library(FUSE fuse)
endif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
target_link_libraries(${PROJECT_NAME} PRIVATE ${FUSE})