blob: 57207aa2fa71ab043d60186f524ae25b7dfa774d [file]
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
get_filename_component(_IOTDB_SESSION_PACKAGE_ROOT "${CMAKE_CURRENT_LIST_DIR}/.." ABSOLUTE)
if(UNIX)
include(CMakeFindDependencyMacro)
find_dependency(Threads)
endif()
if(WIN32)
set(_IOTDB_SESSION_LIBRARY "${_IOTDB_SESSION_PACKAGE_ROOT}/lib/iotdb_session.lib")
elseif(APPLE)
set(_IOTDB_SESSION_LIBRARY "${_IOTDB_SESSION_PACKAGE_ROOT}/lib/libiotdb_session.dylib")
else()
set(_IOTDB_SESSION_LIBRARY "${_IOTDB_SESSION_PACKAGE_ROOT}/lib/libiotdb_session.so")
endif()
if(NOT TARGET IoTDB::iotdb_session)
add_library(IoTDB::iotdb_session SHARED IMPORTED)
set_target_properties(IoTDB::iotdb_session PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${_IOTDB_SESSION_PACKAGE_ROOT}/include")
set(_IOTDB_SESSION_CXX11_ABI_COMPILE_DEFINITION "@IOTDB_SESSION_CXX11_ABI_COMPILE_DEFINITION@")
if(_IOTDB_SESSION_CXX11_ABI_COMPILE_DEFINITION)
set_target_properties(IoTDB::iotdb_session PROPERTIES
INTERFACE_COMPILE_DEFINITIONS "${_IOTDB_SESSION_CXX11_ABI_COMPILE_DEFINITION}")
endif()
if(UNIX)
set_target_properties(IoTDB::iotdb_session PROPERTIES
INTERFACE_LINK_LIBRARIES Threads::Threads)
endif()
if(WIN32)
set_target_properties(IoTDB::iotdb_session PROPERTIES
IMPORTED_IMPLIB "${_IOTDB_SESSION_LIBRARY}"
IMPORTED_LOCATION "${_IOTDB_SESSION_PACKAGE_ROOT}/lib/iotdb_session.dll")
else()
set_target_properties(IoTDB::iotdb_session PROPERTIES
IMPORTED_LOCATION "${_IOTDB_SESSION_LIBRARY}")
endif()
endif()
set(iotdb-session_VERSION "@IOTDB_SESSION_VERSION@")