Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

TVPaint: Plugin build without dependencies #2705

Merged
merged 3 commits into from
Feb 14, 2022
Merged
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
5 changes: 4 additions & 1 deletion openpype/hosts/tvpaint/api/communication_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -586,7 +586,10 @@ def _prepare_windows_plugin(self, launch_args):
"additional_libraries"
)
additional_libs_folder = additional_libs_folder.replace("\\", "/")
if additional_libs_folder not in os.environ["PATH"]:
if (
os.path.exists(additional_libs_folder)
and additional_libs_folder not in os.environ["PATH"]
):
os.environ["PATH"] += (os.pathsep + additional_libs_folder)

# Path to TVPaint's plugins folder (where we want to add our plugin)
Expand Down
21 changes: 16 additions & 5 deletions openpype/hosts/tvpaint/tvpaint_plugin/plugin_code/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,31 +10,42 @@ set(IP_ENABLE_DOCTEST OFF)
if(MSVC)
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
add_definitions(-D_CRT_SECURE_NO_WARNINGS)
# Define WIN64 or WIN32 for TVPaint SDK
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
message("64bit")
add_definitions(-DWIN64)
elseif(CMAKE_SIZEOF_VOID_P EQUAL 4)
message("32bit")
add_definitions(-DWIN32)
endif()
endif()

# TODO better options
option(BOOST_ROOT "Path to root of Boost" "")

option(OPENSSL_INCLUDE "OpenSSL include path" "")
option(OPENSSL_INCLUDE "OpenSSL include path" "")
option(OPENSSL_LIB_DIR "OpenSSL lib path" "")

option(WEBSOCKETPP_INCLUDE "Websocketpp include path" "")
option(WEBSOCKETPP_LIB_DIR "Websocketpp lib path" "")

option(JSONRPCPP_INCLUDE "Jsonrpcpp include path" "")

find_package(Boost 1.72.0 COMPONENTS random)
# Use static boost libraries
set(Boost_USE_STATIC_LIBS ON)

find_package(Boost COMPONENTS random chrono date_time regex REQUIRED)

include_directories(
"${TVPAINT_SDK_INCLUDE}"
"${OPENSSL_INCLUDE}"
"${WEBSOCKETPP_INCLUDE}"
"${JSONRPCPP_INCLUDE}"
"${Boost_INCLUDE_DIR}"
"${Boost_INCLUDE_DIRS}"
)

link_directories(
"${OPENSSL_LIB_DIR}"
"${WEBSOCKETPP_LIB_DIR}"
"${Boost_LIBRARY_DIRS}"
)

add_library(jsonrpcpp INTERFACE)
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.