Commit 887ef04c authored by Nikola Hardi's avatar Nikola Hardi
Browse files

Improve CMakeLists to fix MacOS build

parent 5e1ffa6e
......@@ -5,7 +5,8 @@ set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules")
find_package(JSONC REQUIRED)
find_package(OpenSSL REQUIRED)
find_package(libwebsockets REQUIRED)
find_package(ROOT REQUIRED COMPONENTS Net Netx Tree XMLIO)
find_package(ROOT REQUIRED COMPONENTS Net Netx Tree XMLIO PROOF)
find_package(zlib REQUIRED)
foreach(FEATURE xrootd xml)
if(NOT ROOT_${FEATURE}_FOUND)
message(FATAL_ERROR "ROOT was built without ${FEATURE} support (required)")
......@@ -43,7 +44,7 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR})
include_directories(${LIBNAME} ${OPENSSL_INCLUDE_DIR})
ROOT_GENERATE_DICTIONARY(G__${LIBNAME} "${HDRS}" LINKDEF LinkDef.h)
add_library(${LIBNAME} SHARED "${SRCS}" G__${LIBNAME}.cxx)
target_link_libraries(${LIBNAME} ${ROOT_LIBRARIES} json-c websockets)
target_link_libraries(${LIBNAME} ${ROOT_LIBRARIES} json-c websockets ${OPENSSL_LIBRARIES} ${ZLIB_LIBRARIES})
install(TARGETS ${LIBNAME} LIBRARY DESTINATION lib)
install(FILES ${PROJECT_BINARY_DIR}/lib${LIBNAME}.rootmap DESTINATION lib)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment