From 4dae474cf842fbaed5550e3aac7dea091c3ffd99 Mon Sep 17 00:00:00 2001 From: univrsal Date: Thu, 13 Jun 2024 16:08:39 +0200 Subject: [PATCH] CI: Hello darkness my old friend --- CMakeLists.txt | 30 ++++++++++++++---------------- deps/CMakeLists.txt | 2 +- 2 files changed, 15 insertions(+), 17 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 20a9ab94..1828ef5b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -62,23 +62,20 @@ target_compile_definitions(${PROJECT_NAME} PUBLIC find_package(libobs REQUIRED) target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE OBS::libobs) -if(ENABLE_FRONTEND_API) - find_package(obs-frontend-api REQUIRED) - target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE OBS::obs-frontend-api) -endif() -if(ENABLE_QT) - find_package(Qt6 COMPONENTS Widgets Core) - target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE Qt6::Core Qt6::Widgets) - target_compile_options( - ${CMAKE_PROJECT_NAME} PRIVATE $<$:-Wno-quoted-include-in-framework-header - -Wno-comma>) - set_target_properties( - ${CMAKE_PROJECT_NAME} - PROPERTIES AUTOMOC ON - AUTOUIC ON - AUTORCC ON) -endif() +find_package(obs-frontend-api REQUIRED) +target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE OBS::obs-frontend-api) + + +find_package(Qt6 COMPONENTS Widgets Core) +target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE Qt6::Core Qt6::Widgets) +target_compile_options( +${CMAKE_PROJECT_NAME} PRIVATE $<$:-Wno-quoted-include-in-framework-header + -Wno-comma>) +set_target_properties( +${CMAKE_PROJECT_NAME} +PROPERTIES AUTOMOC ON + AUTOUIC ON if (MSVC) set(input-overlay_PLATFORM_SOURCES @@ -172,3 +169,4 @@ target_sources(${CMAKE_PROJECT_NAME} PRIVATE ${MONGOOSE_SOURCE}) set_target_properties_plugin(${CMAKE_PROJECT_NAME} PROPERTIES OUTPUT_NAME ${_name}) +configure_file(src/plugin-macros.h.in ${CMAKE_SOURCE_DIR}/src/plugin-macros.generated.h) diff --git a/deps/CMakeLists.txt b/deps/CMakeLists.txt index 66e60e72..b79070c0 100644 --- a/deps/CMakeLists.txt +++ b/deps/CMakeLists.txt @@ -15,7 +15,7 @@ set(UIOHOOK_ENABLE_SHARED OFF CACHE INTERNAL "Internal var") set(UIOHOOK_ENABLE_STATIC ON CACHE INTERNAL "Internal var") set(UIOHOOK_ENABLE_INSTALL OFF CACHE INTERNAL "Internal var") -if (MSVC) +if (WIN32 OR WIN64) if(CMAKE_SIZEOF_VOID_P EQUAL 8) set(SDL2_LIBRARIES "${CMAKE_CURRENT_SOURCE_DIR}/sdl2/bin/x64/SDL2.lib" CACHE STRING "" FORCE) set(SDL2_DLLS "${CMAKE_CURRENT_SOURCE_DIR}/sdl2/bin/x64/SDL2.dll" CACHE STRING "" FORCE)