diff --git a/toonz/sources/CMakeLists.txt b/toonz/sources/CMakeLists.txt index fe1d8b7..fc0d0a1 100644 --- a/toonz/sources/CMakeLists.txt +++ b/toonz/sources/CMakeLists.txt @@ -157,7 +157,7 @@ elseif(BUILD_ENV_APPLE) endif() message("PLATFORM:" ${PLATFORM}) if(PLATFORM EQUAL 64) - set(QT_PATH "~/Qt5.9.2/5.9.2/clang_64/lib" CACHE PATH "Qt instlattion directory") + set(QT_PATH "/usr/local/Cellar/qt/5.12.2/lib" CACHE PATH "Qt instlattion directory") set(QT_LIB_PATH "${QT_PATH}/") set(CMAKE_PREFIX_PATH "${QT_LIB_PATH}cmake/") @@ -277,7 +277,7 @@ macro(_find_toonz_library OUT_LIB_LIST IN_LIB_LIST) unset(COREPATH CACHE) # find しても cmake が走るときにはできていないので完全なパス名を生成して返すだけ if(BUILD_ENV_APPLE) - set(LIBPATH ${CMAKE_CURRENT_BINARY_DIR}/../${arg}/lib${arg}${CMAKE_SHARED_LIBRARY_SUFFIX}) + set(LIBPATH "\$") else() set(LIBPATH ${arg}) endif() diff --git a/toonz/sources/tnzbase/CMakeLists.txt b/toonz/sources/tnzbase/CMakeLists.txt index 3df02f3..f7cbc45 100644 --- a/toonz/sources/tnzbase/CMakeLists.txt +++ b/toonz/sources/tnzbase/CMakeLists.txt @@ -200,7 +200,7 @@ elseif(BUILD_ENV_APPLE) find_library(COCOA_LIB Cocoa) set(EXTRA_LIBS - ${CMAKE_CURRENT_BINARY_DIR}/../tnzcore/libtnzcore.dylib + "$" ${USB_LIB} ${TWAIN_LIB} ${IOKIT_LIB} diff --git a/toonz/sources/tnzext/CMakeLists.txt b/toonz/sources/tnzext/CMakeLists.txt index f44761d..f4c8f13 100644 --- a/toonz/sources/tnzext/CMakeLists.txt +++ b/toonz/sources/tnzext/CMakeLists.txt @@ -117,8 +117,8 @@ if(BUILD_ENV_MSVC) ) elseif(BUILD_ENV_APPLE) set(EXTRA_LIBS - ${CMAKE_CURRENT_BINARY_DIR}/../tnzcore/libtnzcore.dylib - ${CMAKE_CURRENT_BINARY_DIR}/../tnzbase/libtnzbase.dylib + "$" + "$" ) target_link_libraries(tnzext diff --git a/toonz/sources/toonz/CMakeLists.txt b/toonz/sources/toonz/CMakeLists.txt index 067887b..4ea4287 100644 --- a/toonz/sources/toonz/CMakeLists.txt +++ b/toonz/sources/toonz/CMakeLists.txt @@ -1,4 +1,4 @@ -set(VERSION 1.3) +set(VERSION 1.3) set(MOC_HEADERS addfilmstripframespopup.h @@ -479,29 +479,29 @@ if(BUILD_ENV_APPLE) message(" ==> App Bundle: " ${loc}) message(" ==> Mach-o: " ${bin}) foreach(lib ${EXTRA_LIBS}) - message(" copy:" ${lib} "==>" ${CMAKE_CURRENT_BINARY_DIR}/OpenToonz.app/Contents/MacOS/) - add_custom_command(TARGET OpenToonz POST_BUILD COMMAND cp ${lib} ${CMAKE_CURRENT_BINARY_DIR}/OpenToonz.app/Contents/MacOS/) + message(" copy:" ${lib} "==>" ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) + add_custom_command(TARGET OpenToonz POST_BUILD COMMAND cp ${lib} ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) endforeach() + add_custom_command(TARGET OpenToonz POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy $ ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} DEPENDS tcomposer) + add_custom_command(TARGET OpenToonz POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy $ ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} DEPENDS tcleanup) + add_custom_command(TARGET OpenToonz POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy $ ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} DEPENDS tconverter) + add_custom_command(TARGET OpenToonz POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy $ ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} DEPENDS tfarmcontroller) + add_custom_command(TARGET OpenToonz POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy $ ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} DEPENDS tfarmserver) + + add_custom_command(TARGET OpenToonz POST_BUILD COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/../Resources) + add_custom_command(TARGET OpenToonz POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/../install/SystemVar.ini ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/../Resources) + + add_custom_command(TARGET OpenToonz POST_BUILD COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/../../../qss) + add_custom_command(TARGET OpenToonz POST_BUILD COMMAND - ${CMAKE_INSTALL_NAME_TOOL} -add_rpath @executable_path/. ${bin} + ${CMAKE_INSTALL_NAME_TOOL} -add_rpath @executable_path/. ${bin} || true ) add_custom_command(TARGET OpenToonz POST_BUILD COMMAND - ${CMAKE_INSTALL_NAME_TOOL} -add_rpath ${CMAKE_INSTALL_RPATH} ${bin} + ${CMAKE_INSTALL_NAME_TOOL} -add_rpath ${CMAKE_INSTALL_RPATH} ${bin} || true ) - add_custom_command(TARGET OpenToonz POST_BUILD COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/OpenToonz.app/Contents/Resources) - - add_custom_command(TARGET OpenToonz POST_BUILD COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/OpenToonz.app/Contents/Resources) - add_custom_command(TARGET OpenToonz POST_BUILD COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/qss) - add_custom_command(TARGET OpenToonz POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/../install/SystemVar.ini ${CMAKE_CURRENT_BINARY_DIR}/OpenToonz.app/Contents/Resources) - - add_custom_command(TARGET OpenToonz POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy $ ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} DEPENDS tcomposer) - add_custom_command(TARGET OpenToonz POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy $ ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} DEPENDS tcleanup) - add_custom_command(TARGET OpenToonz POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy $ ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} DEPENDS tconverter) - add_custom_command(TARGET OpenToonz POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy $ ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} DEPENDS tfarmcontroller) - add_custom_command(TARGET OpenToonz POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy $ ${CMAKE_RUNTIME_OUTPUT_DIRECTORY} DEPENDS tfarmserver) elseif(BUILD_ENV_UNIXLIKE AND BUILD_TARGET_WIN) # Setup files on Windows platform while cross compilation. diff --git a/toonz/sources/toonzfarm/tfarm/CMakeLists.txt b/toonz/sources/toonzfarm/tfarm/CMakeLists.txt index afcbbed..833c4dc 100644 --- a/toonz/sources/toonzfarm/tfarm/CMakeLists.txt +++ b/toonz/sources/toonzfarm/tfarm/CMakeLists.txt @@ -45,9 +45,9 @@ if(BUILD_ENV_MSVC) ) elseif(BUILD_ENV_APPLE) set(EXTRA_LIBS - ${CMAKE_CURRENT_BINARY_DIR}/../../tnzcore/libtnzcore.dylib - ${CMAKE_CURRENT_BINARY_DIR}/../../tnzbase/libtnzbase.dylib - ${CMAKE_CURRENT_BINARY_DIR}/../../toonzlib/libtoonzlib.dylib + "$" + "$" + "$" ) add_dependencies(tfarm tnzcore tnzbase toonzlib tnzext) elseif(BUILD_ENV_UNIXLIKE) diff --git a/toonz/sources/toonzlib/CMakeLists.txt b/toonz/sources/toonzlib/CMakeLists.txt index e09e470..ca5f21c 100644 --- a/toonz/sources/toonzlib/CMakeLists.txt +++ b/toonz/sources/toonzlib/CMakeLists.txt @@ -361,9 +361,9 @@ if(BUILD_ENV_MSVC) ) elseif(BUILD_ENV_APPLE) set(EXTRA_LIBS - ${CMAKE_CURRENT_BINARY_DIR}/../tnzcore/libtnzcore.dylib - ${CMAKE_CURRENT_BINARY_DIR}/../tnzbase/libtnzbase.dylib - ${CMAKE_CURRENT_BINARY_DIR}/../tnzext/libtnzext.dylib + "$" + "$" + "$" ${USB_LIB} ${MYPAINT_LIB_LDFLAGS} )