This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
pangu-mesa-plug/CMakeLists.txt

79 lines
2.3 KiB
CMake

cmake_minimum_required(VERSION 2.8.10)
option(ENABLE_T1_SWITCH "Enable t1 switch" TRUE)
option(ENABLE_T2_SWITCH "Enable t2 switch" TRUE)
option(ENABLE_NTC_SWITCH "Enable ntc switch" TRUE)
if(ENABLE_NTC_SWITCH)
if(ENABLE_T1_SWITCH)
project(mesa_ntc_t1_plug)
endif()
if(ENABLE_T2_SWITCH)
project(mesa_ntc_t2_plug)
endif()
if(ENABLE_T1_SWITCH AND ENABLE_T2_SWITCH)
project(mesa_ntc_plug)
endif()
add_definitions(-DNTC_SWITCH=1)
set(config_path ntcconf/)
else()
if(ENABLE_T1_SWITCH)
project(mesa_soq_t1_plug)
endif()
if(ENABLE_T2_SWITCH)
project(mesa_soq_t2_plug)
endif()
if(ENABLE_T1_SWITCH AND ENABLE_T2_SWITCH)
project(mesa_soq_plug)
endif()
set(config_path soqconf/)
endif()
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
include(Version)
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -s")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -s")
if ("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
message(SEND_ERROR "In-source builds are not allowed.")
endif ()
#set(CMAKE_VERBOSE_MAKEFILE ON)
#set(CMAKE_COLOR_MAKEFILE ON)
set(ALLOW_DUPLICATE_CUSTOM_TARGETS TRUE)
set(CPACK_RPM_DEBUGINFO_PACKAGE ON)
if(ENABLE_T1_SWITCH)
set(config_filepath t1conf)
set(conflist_filename t1_conflist_business.inf)
set(CMAKE_INSTALL_PREFIX /home/mesasoft/sapp)
add_subdirectory(src/ntc_app_plug)
add_subdirectory(src/ntc_http_collect)
add_subdirectory(src/ntc_ip_comm)
add_subdirectory(src/ntc_ssl_collect)
add_subdirectory(src/soq_dns_plug)
add_subdirectory(src/T1_HTTP_MAIL_BIZ)
add_subdirectory(src/ntc_bgp_plug)
endif()
if(ENABLE_T2_SWITCH)
set(config_filepath t2conf)
set(conflist_filename t2_conflist_business.inf)
set(CMAKE_INSTALL_PREFIX /home/mesasoft/maskey2.0)
add_subdirectory(src/T2_HTTP_MAIL_BIZ)
endif()
if(ENABLE_NTC_SWITCH)
install(DIRECTORY ntcconf/${config_filepath} DESTINATION ${CMAKE_INSTALL_PREFIX} COMPONENT devel)
install(FILES ntcconf/${conflist_filename} DESTINATION ${CMAKE_INSTALL_PREFIX}/plug/business COMPONENT devel RENAME conflist_business.inf)
else()
install(DIRECTORY soqconf/${config_filepath} DESTINATION ${CMAKE_INSTALL_PREFIX} COMPONENT devel)
install(FILES soqconf/${conflist_filename} DESTINATION ${CMAKE_INSTALL_PREFIX}/plug/business COMPONENT devel RENAME conflist_business.inf)
endif()
include(Package)