Commit 582a5ea6 authored by Marina Nikolova's avatar Marina Nikolova
Browse files

Upload New File

parent e7abaf8b
# The MIT License (MIT)
#
# Copyright (c) 2019 Marina Nikolova, EMBL
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
cmake_minimum_required(VERSION 2.8)
find_library (LIBCBF NAMES libcbf cbf PATHS /usr/lib64 /usr/lib /usr/lib/x86_64-linux-gnu NO_DEFAULT_PATH)
find_path (LIBCBF_INCLUDE_DIR cbf.h PATHS /usr/include/cbf)
if (NOT LIBCBF OR NOT LIBCBF_INCLUDE_DIR)
message("-- libcbf not found, unable to build")
return()
else (NOT LIBCBF OR NOT LIBCBF_INCLUDE_DIR)
message("-- Found cbf: ${LIBCBF}\n ${LIBCBF_INCLUDE_DIR}")
endif (NOT LIBCBF OR NOT LIBCBF_INCLUDE_DIR)
find_library (LIBZ NAMES libz z PATHS /usr/lib64 /usr/lib /usr/lib/x86_64-linux-gnu)
find_path (LIBZ_INCLUDE_DIR zlib.h PATHS /usr/include/)
if (NOT LIBZ OR NOT LIBZ_INCLUDE_DIR)
message("-- libz not found, unable to build: ${LIBZ} ${LIBZ_INCLUDE_DIR}")
return()
else (NOT LIBZ OR NOT LIBZ_INCLUDE_DIR)
message("-- Found libz: ${LIBZ}\n ${LIBZ_INCLUDE_DIR}")
endif (NOT LIBZ OR NOT LIBZ_INCLUDE_DIR)
string (TOLOWER "${CMAKE_BUILD_TYPE}" build_type)
if (build_type STREQUAL "debug")
message("-- Debug mode: plugin printouts enabled")
add_definitions (-DDEBUG_MSG_ENABLED)
endif (build_type STREQUAL "debug")
include_directories (${CMAKE_CURRENT_SOURCE_DIR}
${LIBCBF_INCLUDE_DIR}
${LIBZ_INCLUDE_DIR})
set (HEADERS xds_zcbf_defs.h
xds_zcbf_plugin.h)
set (SOURCES xds_zcbf_plugin.cpp)
add_library(xds-zcbf SHARED ${HEADERS} ${SOURCES})
target_link_libraries(xds-zcbf ${LIBCBF} ${LIBZ})
set_target_properties(xds-zcbf PROPERTIES PREFIX "" SUFFIX ".so")
install(TARGETS xds-zcbf LIBRARY DESTINATION lib)
set(XDS_ZCBF_PLUGIN ${CMAKE_CURRENT_BINARY_DIR}/xds_zcbf.so CACHE INTERNAL "")
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