Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@ python/src/xstudio/version.py
/build/
xstudio_install/
**/qml/*_qml_export.h
<<<<<<< HEAD
CMakeUserPresets.json
=======
__build
__build_debug
>>>>>>> c808bb352 (WIP)
aqtinstall.log
3 changes: 0 additions & 3 deletions .gitmodules

This file was deleted.

28 changes: 17 additions & 11 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
cmake_minimum_required(VERSION 3.28 FATAL_ERROR)
cmake_policy(VERSION 3.28)
cmake_minimum_required(VERSION 3.26 FATAL_ERROR)
cmake_policy(VERSION 3.26)
#cmake_minimum_required(VERSION 3.28 FATAL_ERROR)
#cmake_policy(VERSION 3.28)

set(XSTUDIO_GLOBAL_VERSION "1.2.0" CACHE STRING "Version string")
set(XSTUDIO_GLOBAL_NAME xStudio)
Expand All @@ -8,6 +10,17 @@ set(XSTUDIO_GLOBAL_NAME xStudio)

project(${XSTUDIO_GLOBAL_NAME} VERSION ${XSTUDIO_GLOBAL_VERSION} LANGUAGES CXX)

# Work around Qt bug: FindWrapOpenGL.cmake links -framework AGL, which was
# removed from the macOS SDK in 10.14. Fixed upstream in Qt 6.9+ but not
# backported to 6.5/6.8 LTS (see https://codereview.qt-project.org/c/qt/qtbase/+/652022).
# Pre-create the target so Qt's FindWrapOpenGL early-returns and never hits the
# broken AGL block. Can be removed once the minimum supported Qt is >= 6.9.
if(APPLE AND NOT TARGET WrapOpenGL::WrapOpenGL)
find_package(OpenGL REQUIRED)
add_library(WrapOpenGL::WrapOpenGL INTERFACE IMPORTED)
target_link_libraries(WrapOpenGL::WrapOpenGL INTERFACE OpenGL::GL)
endif()

option(BUILD_TESTING "Build tests" OFF)
option(INSTALL_PYTHON_MODULE "Install python module" ON)
option(INSTALL_XSTUDIO "Install xstudio" ON)
Expand All @@ -16,7 +29,6 @@ option(ENABLE_CLANG_TIDY "Enable clang-tidy, ninja clang-tidy." OFF)
option(ENABLE_CLANG_FORMAT "Enable clang format, ninja clangformat." OFF)
option(FORCE_COLORED_OUTPUT "Always produce ANSI-colored output (GNU/Clang only)." TRUE)
option(OPTIMIZE_FOR_NATIVE "Build with -march=native" OFF)
option(OTIO_SUBMODULE "Automatically build OpenTimelineIO as a submodule" OFF)
option(USE_VCPKG "Use Vcpkg for package management" OFF)
option(BUILD_PYSIDE_WIDGETS "Build xstudio player as PySide widget" OFF)
option(OPENIMAGEIO_PLUGIN "Include the OpenImageIO PLugin" ON)
Expand Down Expand Up @@ -188,10 +200,6 @@ endif()

if (USE_VCPKG)

# When building with VCPKG, we will use OTIO submodule
set(OTIO_SUBMODULE true)
add_subdirectory("extern/otio")

set(VCPKG_INTEGRATION ON)

# Install pip and sphinx
Expand All @@ -208,7 +216,7 @@ if (USE_VCPKG)
message(FATAL_ERROR "Failed to ensurepip.")
else()
execute_process(
COMMAND "${Python_EXECUTABLE}" -m pip install setuptools sphinx breathe sphinx-rtd-theme OpenTimelineIO-Plugins importlib_metadata zipp numpy
COMMAND "${Python_EXECUTABLE}" -m pip install setuptools sphinx breathe sphinx-rtd-theme OpenTimelineIO-Plugins importlib_metadata zipp numpy fileseq
RESULT_VARIABLE PIP_RESULT
)
if(PIP_RESULT)
Expand All @@ -218,14 +226,12 @@ if (USE_VCPKG)

else()
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules")
if(${OTIO_SUBMODULE})
add_subdirectory("extern/otio")
endif()
find_package(PkgConfig REQUIRED)
endif()

# Add the necessary libraries from Vcpkg if Vcpkg integration is enabled

find_package(OpenTimelineIO CONFIG REQUIRED)
find_package(nlohmann_json CONFIG REQUIRED)
include(CTest)

Expand Down
92 changes: 88 additions & 4 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
"binaryDir": "${sourceDir}/build",
"cacheVariables": {
"CMAKE_TOOLCHAIN_FILE": "${sourceDir}/../vcpkg/scripts/buildsystems/vcpkg.cmake",
"Qt6_DIR": "/Users/tedwaine/Qt6/6.5.3/macos/lib/cmake/Qt6",
"CMAKE_INSTALL_PREFIX": "xstudio_install",
"X_VCPKG_APPLOCAL_DEPS_INSTALL": "ON",
"BUILD_DOCS": "OFF",
"USE_VCPKG": "ON",
"STUDIO_PLUGINS": "",
"BMD_DECKLINK_PLUGIN": "OFF"
"BMD_DECKLINK_PLUGIN": "OFF",
"VCPKG_OVERLAY_PORTS": "${sourceDir}/cmake/vcpkg_overlay_ports"
}
},
{
Expand Down Expand Up @@ -44,7 +44,6 @@
},
{
"name": "WinDebug",
"hidden": true,
"inherits": ["windows-base"],
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
Expand Down Expand Up @@ -151,10 +150,67 @@
"USE_SANITIZER": "address"
}
},
{
{
"name": "macos-ninja-base-arm",
"inherits": "macos-base-arm",
"generator": "Ninja"
},
{
"name": "macos-ninja-base-intel",
"inherits": "macos-base-intel",
"generator": "Ninja"
},
{
"name": "MacOSNinjaRelease",
"inherits": ["macos-ninja-base-arm"],
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release"
}
},
{
"name": "MacOSNinjaRelWithDebInfo",
"inherits": ["macos-ninja-base-arm"],
"cacheVariables": {
"CMAKE_BUILD_TYPE": "RelWithDebInfo",
"USE_SANITIZER": "address"
}
},
{
"name": "MacOSNinjaDebug",
"inherits": ["macos-ninja-base-arm"],
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
"USE_SANITIZER": "address"
}
},
{
"name": "MacOSIntelNinjaRelease",
"inherits": ["macos-ninja-base-intel"],
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release"
}
},
{
"name": "MacOSIntelNinjaRelWithDebInfo",
"inherits": ["macos-ninja-base-intel"],
"cacheVariables": {
"CMAKE_BUILD_TYPE": "RelWithDebInfo",
"USE_SANITIZER": "address"
}
},
{
"name": "MacOSIntelNinjaDebug",
"inherits": ["macos-ninja-base-intel"],
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
"USE_SANITIZER": "address"
}
},
{
"name": "linux-base",
"inherits": "default",
"cacheVariables": {
"VCPKG_OVERLAY_TRIPLETS": "${sourceDir}/cmake/vcpkg_triplets",
"VCPKG_TARGET_TRIPLET": "x64-xstudio-linux"
}
},
Expand All @@ -180,6 +236,34 @@
"CMAKE_BUILD_TYPE": "Debug",
"USE_SANITIZER": "address"
}
},
{
"name": "linux-ninja-base",
"inherits": "linux-base",
"generator": "Ninja"
},
{
"name": "LinuxNinjaRelease",
"inherits": ["linux-ninja-base"],
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release"
}
},
{
"name": "LinuxNinjaRelWithDebInfo",
"inherits": ["linux-ninja-base"],
"cacheVariables": {
"CMAKE_BUILD_TYPE": "RelWithDebInfo",
"USE_SANITIZER": "address"
}
},
{
"name": "LinuxNinjaDebug",
"inherits": ["linux-ninja-base"],
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug",
"USE_SANITIZER": "address"
}
}
]
}
50 changes: 39 additions & 11 deletions cmake/macros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,17 @@ macro(default_plugin_options name)
# ${CMAKE_INSTALL_PREFIX}/xstudio.bin.app/Contents/Resources/share/xstudio/plugin/lib${name}.dylib
# )

elseif(WIN32)
# On Windows for SHARED libs, RUNTIME_OUTPUT_DIRECTORY controls the .dll
# (LIBRARY_OUTPUT_DIRECTORY only controls the .lib import library).
# Build the .dll directly at the final location so the .pdb sits next to
# it — debuggers resolve symbols without ambiguity, and no POST_BUILD copy
# is needed.
set_target_properties(${name}
PROPERTIES
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/share/xstudio/plugin"
)

else()
set_target_properties(${name}
PROPERTIES
Expand All @@ -209,12 +220,9 @@ macro(default_plugin_options name)
# We don't want the vcpkg install because it forces dependences; we just want the plugin.
_install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION share/xstudio/plugin)

#For interactive debugging, we want only the output dll to be copied to the build plugins folder.
add_custom_command(
TARGET ${PROJECT_NAME}
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy "$<TARGET_FILE:${PROJECT_NAME}>" "${CMAKE_BINARY_DIR}/share/xstudio/plugin"
)
# Note: default_plugin_options sets RUNTIME_OUTPUT_DIRECTORY to
# ${CMAKE_BINARY_DIR}/share/xstudio/plugin on Windows, so the .dll is
# already linked at the final dev-tree location. No POST_BUILD copy needed.
endif()

endmacro()
Expand Down Expand Up @@ -308,6 +316,7 @@ macro(default_options_qt name)
set_target_properties(${name}
PROPERTIES
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/lib"
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin"
)
install(TARGETS ${name} EXPORT xstudio
LIBRARY DESTINATION share/xstudio/lib)
Expand Down Expand Up @@ -379,9 +388,15 @@ macro(add_python_plugin NAME)

else()

add_custom_command(TARGET COPY_PY_PLUGIN_${NAME} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E
copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/${NAME} ${CMAKE_BINARY_DIR}/bin/plugin-python/${NAME})
if (WIN32)
add_custom_command(TARGET COPY_PY_PLUGIN_${NAME} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E
copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/${NAME} ${CMAKE_BINARY_DIR}/share/xstudio/plugin-python/${NAME})
else()
add_custom_command(TARGET COPY_PY_PLUGIN_${NAME} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E
copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/${NAME} ${CMAKE_BINARY_DIR}/bin/plugin-python/${NAME})
endif()

endif()

Expand Down Expand Up @@ -490,10 +505,17 @@ macro(add_resource name path target resource_type)

else()

add_custom_command(TARGET ${target} POST_BUILD
if (WIN32)
add_custom_command(TARGET ${target} POST_BUILD
BYPRODUCTS ${CMAKE_BINARY_DIR}/share/xstudio/${resource_type}/${name}
COMMAND ${CMAKE_COMMAND} -E copy ${path}/${name}
${CMAKE_BINARY_DIR}/share/xstudio/${resource_type}/${name})
else()
add_custom_command(TARGET ${target} POST_BUILD
BYPRODUCTS ${CMAKE_BINARY_DIR}/bin/${resource_type}/${name}
COMMAND ${CMAKE_COMMAND} -E copy ${path}/${name}
${CMAKE_BINARY_DIR}/bin/${resource_type}/${name})
endif()

if(INSTALL_XSTUDIO)
install(FILES
Expand Down Expand Up @@ -555,9 +577,15 @@ macro(add_font name path target)

else()

add_custom_command(TARGET ${target} POST_BUILD
if (WIN32)
add_custom_command(TARGET ${target} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy ${path}/${name}
${CMAKE_BINARY_DIR}/share/xstudio/fonts/${name})
else()
add_custom_command(TARGET ${target} POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy ${path}/${name}
${CMAKE_BINARY_DIR}/bin/fonts/${name})
endif()

if(INSTALL_XSTUDIO)
install(FILES
Expand Down
14 changes: 0 additions & 14 deletions cmake/otio_patch.diff

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -245,7 +245,7 @@
endif()

# set up the internally hosted dependencies
-add_subdirectory(src/deps)
+# add_subdirectory(src/deps)

set (OTIO_IMATH_TARGETS
# For OpenEXR/Imath 3.x:
Loading
Loading