Skip to content

Commit

Permalink
Fix in-tree build for OBS cmake version 3.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
exeldro committed Sep 1, 2023
1 parent f61998e commit 21d25c7
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# --- Detect if the plugin is build out of tree or not ---
if(CMAKE_PROJECT_NAME STREQUAL "obs-studio")
set(BUILD_OUT_OF_TREE OFF)
if(OBS_CMAKE_VERSION VERSION_GREATER_EQUAL 3.0.0)
legacy_check()
endif()
else()
set(BUILD_OUT_OF_TREE ON)
cmake_minimum_required(VERSION 3.18)
Expand Down Expand Up @@ -104,9 +107,14 @@ if(BUILD_OUT_OF_TREE)
LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/${LIB_OUT_DIR})
install(DIRECTORY data/locale data/images
DESTINATION ${CMAKE_INSTALL_PREFIX}/${DATA_OUT_DIR})
setup_plugin_target(${PROJECT_NAME})
else()
target_include_directories(${PROJECT_NAME} PRIVATE
"${CMAKE_SOURCE_DIR}/UI/obs-frontend-api")
set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "plugins/aitum")
if(OBS_CMAKE_VERSION VERSION_GREATER_EQUAL 3.0.0)
set_target_properties_obs(${PROJECT_NAME} PROPERTIES FOLDER "plugins/aitum" PREFIX "")
else()
set_target_properties(${PROJECT_NAME} PROPERTIES FOLDER "plugins/aitum")
setup_plugin_target(${PROJECT_NAME})
endif()
endif()
setup_plugin_target(${PROJECT_NAME})

0 comments on commit 21d25c7

Please sign in to comment.