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.

26 changes: 16 additions & 10 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 @@ -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"
}
}
]
}
1 change: 1 addition & 0 deletions cmake/macros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,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
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:
81 changes: 81 additions & 0 deletions cmake/vcpkg_overlay_ports/opentimelineio/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO AcademySoftwareFoundation/OpenTimelineIO
REF v${VERSION}
SHA512 305d63730446c3b4c368cadd9d7a66de96dafee2168d589ae88a0320319f40cde4a739c9939eb088b635185cb1aabd051360ed432fde3ce11ef145e18c25dd21
HEAD_REF main
PATCHES
0001-disable-src-deps-subdir.patch
)

vcpkg_from_github(
OUT_SOURCE_PATH RAPIDJSON_SOURCE_PATH
REPO Tencent/rapidjson
REF 06d58b9e848c650114556a23294d0b6440078c61
SHA512 f0a7df46234e5b3244a801ddf1daefd26aac7ae5b2c470b8c3898f65c65591f6c9cabac0421800588826da9d3bcccba1f98e1c0c8c15184b3843cf6f3ffbdcad
HEAD_REF master
)

file(COPY "${RAPIDJSON_SOURCE_PATH}/include"
DESTINATION "${SOURCE_PATH}/src/deps/rapidjson")

string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" OTIO_SHARED)

vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DOTIO_SHARED_LIBS=${OTIO_SHARED}
-DOTIO_PYTHON_INSTALL=OFF
-DOTIO_DEPENDENCIES_INSTALL=OFF
-DOTIO_FIND_IMATH=ON
-DOTIO_CXX_INSTALL=ON
-DOTIO_AUTOMATIC_SUBMODULES=OFF
-DOTIO_INSTALL_COMMANDLINE_TOOLS=OFF
)

vcpkg_cmake_install()

vcpkg_cmake_config_fixup(
PACKAGE_NAME opentimelineio
CONFIG_PATH share/opentimelineio
)
vcpkg_cmake_config_fixup(
PACKAGE_NAME opentime
CONFIG_PATH share/opentime
)

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")

# OTIO's upstream CMake installs shared libraries (.dll) into lib/ on Windows,
# but vcpkg's convention (and applocal.ps1's search path) expects DLLs in bin/.
# Move them so they get picked up by dependency deployment, and fix up the
# generated CMake targets files so IMPORTED_LOCATION still resolves.
if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/bin")
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/debug/bin")
file(GLOB _otio_release_dlls "${CURRENT_PACKAGES_DIR}/lib/*.dll")
foreach(_dll ${_otio_release_dlls})
get_filename_component(_name "${_dll}" NAME)
file(RENAME "${_dll}" "${CURRENT_PACKAGES_DIR}/bin/${_name}")
endforeach()
file(GLOB _otio_debug_dlls "${CURRENT_PACKAGES_DIR}/debug/lib/*.dll")
foreach(_dll ${_otio_debug_dlls})
get_filename_component(_name "${_dll}" NAME)
file(RENAME "${_dll}" "${CURRENT_PACKAGES_DIR}/debug/bin/${_name}")
endforeach()

# Rewrite the generated Targets-*.cmake files to reference the new DLL
# locations. Only the .dll paths are changed; .lib (import library) paths
# stay in lib/ where they belong.
file(GLOB _otio_targets_files
"${CURRENT_PACKAGES_DIR}/share/opentime/OpenTimeTargets-*.cmake"
"${CURRENT_PACKAGES_DIR}/share/opentimelineio/OpenTimelineIOTargets-*.cmake"
)
foreach(_file ${_otio_targets_files})
file(READ "${_file}" _content)
string(REGEX REPLACE "/lib/([^/\"]*\\.dll)" "/bin/\\1" _content "${_content}")
file(WRITE "${_file}" "${_content}")
endforeach()
endif()

vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.txt")
18 changes: 18 additions & 0 deletions cmake/vcpkg_overlay_ports/opentimelineio/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "opentimelineio",
"version": "0.17.0",
"description": "A file format and API for describing editorial timelines",
"homepage": "https://opentimeline.io",
"license": "Apache-2.0",
"dependencies": [
"imath",
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
]
}
21 changes: 0 additions & 21 deletions docs/reference/build_guides/developer_tips.md

This file was deleted.

Loading