diff --git a/openpype/hosts/tvpaint/api/communication_server.py b/openpype/hosts/tvpaint/api/communication_server.py index c8d6d3b4581..e9c5f4c73eb 100644 --- a/openpype/hosts/tvpaint/api/communication_server.py +++ b/openpype/hosts/tvpaint/api/communication_server.py @@ -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) diff --git a/openpype/hosts/tvpaint/tvpaint_plugin/plugin_code/CMakeLists.txt b/openpype/hosts/tvpaint/tvpaint_plugin/plugin_code/CMakeLists.txt index ecd94acc99d..c221eb0431f 100644 --- a/openpype/hosts/tvpaint/tvpaint_plugin/plugin_code/CMakeLists.txt +++ b/openpype/hosts/tvpaint/tvpaint_plugin/plugin_code/CMakeLists.txt @@ -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) diff --git a/openpype/hosts/tvpaint/tvpaint_plugin/plugin_files/windows_x64/additional_libraries/boost_random-vc142-mt-x64-1_72.dll b/openpype/hosts/tvpaint/tvpaint_plugin/plugin_files/windows_x64/additional_libraries/boost_random-vc142-mt-x64-1_72.dll deleted file mode 100644 index 46bd533b72d..00000000000 Binary files a/openpype/hosts/tvpaint/tvpaint_plugin/plugin_files/windows_x64/additional_libraries/boost_random-vc142-mt-x64-1_72.dll and /dev/null differ diff --git a/openpype/hosts/tvpaint/tvpaint_plugin/plugin_files/windows_x64/plugin/OpenPypePlugin.dll b/openpype/hosts/tvpaint/tvpaint_plugin/plugin_files/windows_x64/plugin/OpenPypePlugin.dll index 293a7b19b01..f7f5119ef34 100644 Binary files a/openpype/hosts/tvpaint/tvpaint_plugin/plugin_files/windows_x64/plugin/OpenPypePlugin.dll and b/openpype/hosts/tvpaint/tvpaint_plugin/plugin_files/windows_x64/plugin/OpenPypePlugin.dll differ diff --git a/openpype/hosts/tvpaint/tvpaint_plugin/plugin_files/windows_x86/additional_libraries/boost_random-vc142-mt-x32-1_72.dll b/openpype/hosts/tvpaint/tvpaint_plugin/plugin_files/windows_x86/additional_libraries/boost_random-vc142-mt-x32-1_72.dll deleted file mode 100644 index ccf2fd8562e..00000000000 Binary files a/openpype/hosts/tvpaint/tvpaint_plugin/plugin_files/windows_x86/additional_libraries/boost_random-vc142-mt-x32-1_72.dll and /dev/null differ diff --git a/openpype/hosts/tvpaint/tvpaint_plugin/plugin_files/windows_x86/plugin/OpenPypePlugin.dll b/openpype/hosts/tvpaint/tvpaint_plugin/plugin_files/windows_x86/plugin/OpenPypePlugin.dll index 9671d8a27b1..f35e3ffe868 100644 Binary files a/openpype/hosts/tvpaint/tvpaint_plugin/plugin_files/windows_x86/plugin/OpenPypePlugin.dll and b/openpype/hosts/tvpaint/tvpaint_plugin/plugin_files/windows_x86/plugin/OpenPypePlugin.dll differ