123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163 |
- cmake_minimum_required(VERSION 3.12)
- project(OSC_Software VERSION 0.1 LANGUAGES CXX)
- set(CMAKE_AUTOUIC ON)
- set(CMAKE_AUTOMOC ON)
- set(CMAKE_AUTORCC ON)
- set(CMAKE_CXX_STANDARD 17)
- set(CMAKE_CXX_STANDARD_REQUIRED ON)
- if(CMAKE_SYSTEM_NAME MATCHES "Linux")
- message(STATUS "Using Linux System")
- if(CMAKE_BUILD_TYPE MATCHES Debug)
- set(exec_out_path ${CMAKE_SOURCE_DIR}/../bin_Debug)
- set(BUILD_LIB_PATH ${CMAKE_SOURCE_DIR}/../bin_Debug)
- elseif(CMAKE_BUILD_TYPE MATCHES Release)
- set(exec_out_path ${CMAKE_SOURCE_DIR}/../bin_Release)
- set(BUILD_LIB_PATH ${CMAKE_SOURCE_DIR}/../bin_Release)
- endif()
- elseif(CMAKE_SYSTEM_NAME MATCHES "Windows")
- message(STATUS "Using Windows System")
- if(CMAKE_CXX_COMPILER_ID MATCHES GNU)
- message(STATUS "Using Compiler : ${CMAKE_CXX_COMPILER_ID}")
-
- if(CMAKE_SIZEOF_VOID_P EQUAL 8)
- message(STATUS "Using 64bit Compiler")
-
- set(exec_out_path ${CMAKE_SOURCE_DIR}/../../bin_GNU_64)
-
- set(BUILD_LIB_PATH ${CMAKE_SOURCE_DIR}/../../bin_GNU_64)
- elseif(CMAKE_SIZEOF_VOID_P EQUAL 4)
- message(STATUS "Using 32bit Compiler")
-
- set(exec_out_path ${CMAKE_SOURCE_DIR}/../../bin_GNU_32)
-
- set(BUILD_LIB_PATH ${CMAKE_SOURCE_DIR}/../../bin_GNU_32)
- endif()
- if(CMAKE_BUILD_TYPE MATCHES Debug)
- message(STATUS "编译类型:${CMAKE_BUILD_TYPE}")
- else()
- message(STATUS "编译类型:${CMAKE_BUILD_TYPE}")
- endif()
- elseif(CMAKE_CXX_COMPILER_ID MATCHES MSVC)
-
-
-
- set(exec_out_path ${CMAKE_SOURCE_DIR}/../bin_MSVC)
-
- set(BUILD_LIB_PATH ${CMAKE_SOURCE_DIR}/../bin_MSVC)
- endif()
- endif()
- set(EXECUTABLE_OUTPUT_PATH ${exec_out_path})
- set(LIBRARY_OUTPUT_PATH ${exec_out_path})
- link_directories(${BUILD_LIB_PATH})
- if(CMAKE_CXX_COMPILER_ID MATCHES MSVC)
-
-
-
-
-
-
- add_compile_definitions("_SILENCE_STDEXT_ARR_ITERS_DEPRECATION_WARNING")
- endif()
- if(CMAKE_CXX_COMPILER_ID MATCHES GNU)
- endif()
- if(CMAKE_BUILD_TYPE MATCHES Debug)
- add_compile_definitions(C_DEBUG)
- elseif(CMAKE_BUILD_TYPE MATCHES Release)
- add_compile_definitions(C_RELEASE)
- endif()
- if(CMAKE_SIZEOF_VOID_P EQUAL 8)
- option(ENABLE_SPDLOG_STATIC_LIB "使用SPDLOG静态库" OFF)
- elseif(CMAKE_SIZEOF_VOID_P EQUAL 4)
- endif()
- add_compile_definitions(SPDLOG_COMPILED_LIB)
- add_compile_definitions(SPDLOG_ACTIVE_LEVEL=SPDLOG_LEVEL_TRACE)
- find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Widgets)
- find_package(Qt5 COMPONENTS
- Widgets
- Core
- Network
- Sql
- REQUIRED
- )
- include(${CMAKE_SOURCE_DIR}/External/Libraries/Libraries.cmake)
- file(GLOB GLOBAL_SRC
- )
- add_subdirectory(EyeMap)
|