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
2019-07-03 17:43:57 +08:00

62 lines
1.5 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)
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()
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(CMAKE_INSTALL_PREFIX /home/mesasoft/sapp)
set(CPACK_RPM_DEBUGINFO_PACKAGE ON)
if(ENABLE_T1_SWITCH)
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)
add_subdirectory(src/T2_HTTP_MAIL_BIZ)
endif()
include(Package)