better organize cmake files
This commit is contained in:
@@ -1,25 +1,3 @@
|
|||||||
cmake_minimum_required(VERSION 3.20)
|
cmake_minimum_required(VERSION 3.20)
|
||||||
|
|
||||||
set(CMAKE_CXX_STANDARD 17)
|
add_subdirectory(src/frontend)
|
||||||
|
|
||||||
include(CheckCCompilerFlag)
|
|
||||||
|
|
||||||
check_c_compiler_flag(-msse4.1 HAS_SSE4_1)
|
|
||||||
|
|
||||||
if (HAS_SSE4_1)
|
|
||||||
add_compile_definitions(SIMD_SUPPORT)
|
|
||||||
add_compile_options(-msse3 -msse4.1)
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
if(${CMAKE_BUILD_TYPE} MATCHES Debug)
|
|
||||||
add_compile_definitions(VULKAN_DEBUG)
|
|
||||||
#add_compile_options(-fsanitize=address -fsanitize=undefined)
|
|
||||||
#add_link_options(-fsanitize=address -fsanitize=undefined)
|
|
||||||
add_link_options(-Wl,--export-dynamic)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
find_package(Qt6 COMPONENTS Core Gui Widgets)
|
|
||||||
|
|
||||||
if (Qt6_FOUND)
|
|
||||||
add_subdirectory(src/frontend)
|
|
||||||
endif()
|
|
||||||
@@ -2,6 +2,7 @@ cmake_minimum_required(VERSION 3.20)
|
|||||||
project(kaizen-qt)
|
project(kaizen-qt)
|
||||||
|
|
||||||
set(CMAKE_CXX_STANDARD 17)
|
set(CMAKE_CXX_STANDARD 17)
|
||||||
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
|
|
||||||
find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets)
|
find_package(Qt6 REQUIRED COMPONENTS Core Gui Widgets)
|
||||||
find_package(SDL2 CONFIG REQUIRED)
|
find_package(SDL2 CONFIG REQUIRED)
|
||||||
@@ -34,8 +35,6 @@ include_directories(
|
|||||||
../../external/parallel-rdp/parallel-rdp-standalone/vulkan
|
../../external/parallel-rdp/parallel-rdp-standalone/vulkan
|
||||||
../../external/parallel-rdp/parallel-rdp-standalone/vulkan-headers/include
|
../../external/parallel-rdp/parallel-rdp-standalone/vulkan-headers/include
|
||||||
../../external/parallel-rdp/parallel-rdp-standalone/util
|
../../external/parallel-rdp/parallel-rdp-standalone/util
|
||||||
../../external/imgui/imgui
|
|
||||||
../../external/imgui/imgui/backends
|
|
||||||
../../external/unarr
|
../../external/unarr
|
||||||
${SDL2_INCLUDE_DIRS}
|
${SDL2_INCLUDE_DIRS}
|
||||||
)
|
)
|
||||||
@@ -77,6 +76,21 @@ add_executable(kaizen-qt
|
|||||||
InputSettings.hpp
|
InputSettings.hpp
|
||||||
InputSettings.cpp)
|
InputSettings.cpp)
|
||||||
|
|
||||||
|
include(CheckCCompilerFlag)
|
||||||
|
|
||||||
|
check_c_compiler_flag(-msse4.1 HAS_SSE4_1)
|
||||||
|
|
||||||
|
if (HAS_SSE4_1)
|
||||||
|
target_compile_definitions(kaizen-qt PUBLIC SIMD_SUPPORT)
|
||||||
|
target_compile_options(kaizen-qt PUBLIC -msse3 -msse4.1)
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
if(${CMAKE_BUILD_TYPE} MATCHES Debug)
|
||||||
|
target_compile_definitions(kaizen-qt PUBLIC VULKAN_DEBUG)
|
||||||
|
#target_compile_options(kaizen-qt PUBLIC -fsanitize=address -fsanitize=undefined)
|
||||||
|
#target_link_options(kaizen-qt PUBLIC -fsanitize=address -fsanitize=undefined)
|
||||||
|
endif()
|
||||||
|
|
||||||
target_link_libraries(kaizen-qt PUBLIC Qt6::Core Qt6::Gui Qt6::Widgets discord-rpc fmt mio nlohmann_json parallel-rdp backend)
|
target_link_libraries(kaizen-qt PUBLIC Qt6::Core Qt6::Gui Qt6::Widgets discord-rpc fmt mio nlohmann_json parallel-rdp backend)
|
||||||
target_compile_definitions(kaizen-qt PUBLIC SDL_MAIN_HANDLED)
|
target_compile_definitions(kaizen-qt PUBLIC SDL_MAIN_HANDLED)
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include <common.hpp>
|
#include <common.hpp>
|
||||||
#include <fmt/color.h>
|
#include <fmt/core.h>
|
||||||
#include <fmt/format.h>
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#if !defined(NDEBUG) && !defined(_WIN32)
|
#if !defined(NDEBUG) && !defined(_WIN32)
|
||||||
#include <dlfcn.h>
|
#include <dlfcn.h>
|
||||||
|
|||||||
Reference in New Issue
Block a user