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
Raw Permalink Normal View History

2019-07-03 14:22:03 +08:00
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)
2019-07-04 09:56:10 +08:00
set(config_path ntcconf/)
2019-07-03 14:22:03 +08:00
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()
2019-07-04 09:56:10 +08:00
set(config_path soqconf/)
2019-07-03 14:22:03 +08:00
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)
2019-07-04 09:56:10 +08:00
set(config_filepath t1conf)
set(conflist_filename t1_conflist_business.inf)
2019-07-03 17:49:50 +08:00
set(CMAKE_INSTALL_PREFIX /home/mesasoft/sapp)
2019-07-03 14:22:03 +08:00
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)
2019-07-03 17:43:57 +08:00
add_subdirectory(src/ntc_bgp_plug)
2019-07-03 14:22:03 +08:00
endif()
if(ENABLE_T2_SWITCH)
2019-07-04 09:56:10 +08:00
set(config_filepath t2conf)
set(conflist_filename t2_conflist_business.inf)
2019-07-03 17:49:50 +08:00
set(CMAKE_INSTALL_PREFIX /home/mesasoft/maskey2.0)
2019-07-03 14:22:03 +08:00
add_subdirectory(src/T2_HTTP_MAIL_BIZ)
endif()
2019-07-04 09:56:10 +08:00
if(ENABLE_NTC_SWITCH)
install(DIRECTORY ntcconf/${config_filepath} DESTINATION ${CMAKE_INSTALL_PREFIX} COMPONENT devel)
2019-07-04 09:56:10 +08:00
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)
2019-07-04 09:56:10 +08:00
install(FILES soqconf/${conflist_filename} DESTINATION ${CMAKE_INSTALL_PREFIX}/plug/business COMPONENT devel RENAME conflist_business.inf)
endif()
2019-07-03 14:22:03 +08:00
include(Package)