create version
This commit is contained in:
60
CMakeLists.txt
Normal file
60
CMakeLists.txt
Normal file
@@ -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)
|
||||
Reference in New Issue
Block a user