#
# Copyright 2017 Centreon
#
# Licensed 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.
#
# For more information : contact@centreon.com
#

# Global options.
include_directories("${PROJECT_SOURCE_DIR}/generator/inc")
set(INC_DIR "${PROJECT_SOURCE_DIR}/generator/inc/com/centreon/broker/generator")
set(SRC_DIR "${PROJECT_SOURCE_DIR}/generator/src")

# generator module.
set(GENERATOR "90-generator")
set(GENERATOR "${GENERATOR}" PARENT_SCOPE)
add_library("${GENERATOR}" SHARED
  # Sources.
  "${SRC_DIR}/dummy.cc"
  "${SRC_DIR}/endpoint.cc"
  "${SRC_DIR}/factory.cc"
  "${SRC_DIR}/main.cc"
  "${SRC_DIR}/receiver.cc"
  "${SRC_DIR}/sender.cc"
  # Headers.
  "${INC_DIR}/dummy.hh"
  "${INC_DIR}/endpoint.hh"
  "${INC_DIR}/factory.hh"
  "${INC_DIR}/internal.hh"
  "${INC_DIR}/receiver.hh"
  "${INC_DIR}/sender.hh"
)
set_target_properties("${GENERATOR}" PROPERTIES PREFIX "")

# Install rule.
install(TARGETS "${GENERATOR}"
  LIBRARY DESTINATION "${PREFIX_MODULES}"
)
