summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt60
1 files changed, 60 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..7440a83
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,60 @@
+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)
+endif()
+
+if(ENABLE_T2_SWITCH)
+ add_subdirectory(src/T2_HTTP_MAIL_BIZ)
+endif()
+
+include(Package)