#
# 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.
#


set(CMAKE_DEBUG_POSTFIX "d" CACHE STRING "Set debug library postfix" FORCE)


macro(ADD_LIBRARY_THRIFT name)

if(WITH_SHARED_LIB)
    add_library(${name} SHARED ${ARGN})
    #target_link_libraries(${name} ${SYSLIBS})
    set_target_properties(${name} PROPERTIES
        OUTPUT_NAME ${name}
        VERSION ${thrift_VERSION}
        SOVERSION ${thrift_VERSION} )
    #set_target_properties(${name} PROPERTIES PUBLIC_HEADER "${thriftcpp_HEADERS}")
    install(TARGETS ${name}
        RUNTIME DESTINATION "${BIN_INSTALL_DIR}"
        LIBRARY DESTINATION "${LIB_INSTALL_DIR}"
        ARCHIVE DESTINATION "${LIB_INSTALL_DIR}"
        PUBLIC_HEADER DESTINATION "${INCLUDE_INSTALL_DIR}")
endif()

if(WITH_STATIC_LIB)
    add_library(${name}_static STATIC ${ARGN})
    #target_link_libraries(${name}_static ${SYSLIBS})
    set_target_properties(${name}_static PROPERTIES
        OUTPUT_NAME ${name}${STATIC_POSTFIX}
        VERSION ${thrift_VERSION}
        SOVERSION ${thrift_VERSION} )
    install(TARGETS ${name}_static
        RUNTIME DESTINATION "${BIN_INSTALL_DIR}"
        LIBRARY DESTINATION "${LIB_INSTALL_DIR}"
        ARCHIVE DESTINATION "${LIB_INSTALL_DIR}"
        PUBLIC_HEADER DESTINATION "${INCLUDE_INSTALL_DIR}")
endif()

endmacro()

macro(TARGET_LINK_LIBRARIES_THRIFT name)

if(WITH_SHARED_LIB)
    target_link_libraries(${name} ${ARGN})
endif()

if(WITH_STATIC_LIB)
    target_link_libraries(${name}_static ${ARGN})
endif()

endmacro()