2016-02-11 12:53:42 +01:00
|
|
|
project (fspp)
|
|
|
|
|
|
|
|
set(SOURCES
|
|
|
|
impl/FilesystemImpl.cpp
|
|
|
|
impl/Profiler.cpp
|
|
|
|
fuse/Fuse.cpp
|
|
|
|
)
|
|
|
|
|
|
|
|
add_library(${PROJECT_NAME} STATIC ${SOURCES})
|
|
|
|
|
|
|
|
# This is needed by boost thread
|
|
|
|
#if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
|
|
|
# target_link_libraries(${PROJECT_NAME} PRIVATE rt)
|
|
|
|
#endif(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
|
|
|
|
|
|
|
target_compile_definitions(${PROJECT_NAME} PUBLIC _FILE_OFFSET_BITS=64)
|
2016-02-11 14:01:59 +01:00
|
|
|
target_link_libraries(${PROJECT_NAME} PUBLIC cpp-utils)
|
2016-02-11 12:53:42 +01:00
|
|
|
|
2016-02-11 12:57:50 +01:00
|
|
|
target_add_boost(${PROJECT_NAME} filesystem system thread chrono)
|
|
|
|
target_enable_style_warnings(${PROJECT_NAME})
|
|
|
|
target_activate_cpp14(${PROJECT_NAME})
|
2016-02-11 12:53:42 +01:00
|
|
|
|
|
|
|
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
2016-02-14 04:17:35 +01:00
|
|
|
set(CMAKE_FIND_FRAMEWORK LAST)
|
2016-02-14 15:55:54 +01:00
|
|
|
set(FUSE_LIB_NAME "osxfuse")
|
2016-02-14 02:38:01 +01:00
|
|
|
else(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
2016-02-14 15:55:54 +01:00
|
|
|
set(FUSE_LIB_NAME "fuse")
|
2016-02-11 12:53:42 +01:00
|
|
|
endif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
2016-02-14 02:38:01 +01:00
|
|
|
|
2016-02-14 15:55:54 +01:00
|
|
|
find_library_with_path(FUSE ${FUSE_LIB_NAME} FUSE_LIB_PATH)
|
2016-02-14 04:17:35 +01:00
|
|
|
target_link_libraries(${PROJECT_NAME} PUBLIC ${FUSE})
|