Toshihiro Shimizu 890ddd
set(HEADERS
Toshihiro Shimizu 890ddd
    sgi/tiio_sgi.h
Toshihiro Shimizu 890ddd
    tif/tiio_tif.h
Toshihiro Shimizu 890ddd
    pli/pli_io.h
Toshihiro Shimizu 890ddd
    pli/tiio_pli.h
Toshihiro Shimizu 890ddd
    tga/tiio_tga.h
Toshihiro Shimizu 890ddd
    compatibility/inforegion.h
Toshihiro Shimizu 890ddd
    compatibility/tfile_io.h
Toshihiro Shimizu 890ddd
    compatibility/tnz4.h
Toshihiro Shimizu 890ddd
    quantel/filequantel.h
Toshihiro Shimizu 890ddd
    quantel/filequantelP.h
Toshihiro Shimizu 890ddd
    quantel/tiio_quantel.h
Toshihiro Shimizu 890ddd
    png/tiio_png.h
Toshihiro Shimizu 890ddd
    psd/tiio_psd.h
Toshihiro Shimizu 890ddd
    svg/tiio_svg.h
Toshihiro Shimizu 890ddd
    tzp/tiio_plt.h
Toshihiro Shimizu 890ddd
    tzp/tiio_tzp.h
Toshihiro Shimizu 890ddd
    tzp/toonztags.h
Toshihiro Shimizu 890ddd
    tzl/tiio_tzl.h
Toshihiro Shimizu 890ddd
    ../include/tnzimage.h
Toshihiro Shimizu 890ddd
    mov/tiio_mov_proxy.h
Toshihiro Shimizu 890ddd
    3gp/tiio_3gp_proxy.h
turtletooth 04d8fd
    ffmpeg/tiio_gif.h
turtletooth 04d8fd
    ffmpeg/tiio_webm.h
turtletooth 04d8fd
    ffmpeg/tiio_mp4.h
turtletooth 04d8fd
    ffmpeg/tiio_ffmpeg.h
Jeremy Bullock 764038
    sprite/tiio_sprite.h
Campbell Barton 9ece9c
    mesh/tiio_mesh.h
Campbell Barton 9ece9c
)
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
set(SOURCES
Toshihiro Shimizu 890ddd
    tiio.cpp
Toshihiro Shimizu 890ddd
    sgi/filesgi.cpp
Toshihiro Shimizu 890ddd
    tif/tiio_tif.cpp
Toshihiro Shimizu 890ddd
    pli/pli_io.cpp
Toshihiro Shimizu 890ddd
    pli/tags.cpp
Toshihiro Shimizu 890ddd
    pli/tiio_pli.cpp
Toshihiro Shimizu 890ddd
    tga/tiio_tga.cpp
Toshihiro Shimizu 890ddd
    compatibility/inforegion.c
Toshihiro Shimizu 890ddd
    compatibility/tfile_io.c
Toshihiro Shimizu 890ddd
    compatibility/tnz4.c
Toshihiro Shimizu 890ddd
    compatibility/tnz4_cpp.cpp
Toshihiro Shimizu 890ddd
    quantel/filequantel.c
Toshihiro Shimizu 890ddd
    quantel/tiio_quantel.cpp
Toshihiro Shimizu 890ddd
    png/tiio_png.cpp
Toshihiro Shimizu 890ddd
    psd/tiio_psd.cpp
Toshihiro Shimizu 890ddd
    svg/tiio_svg.cpp
Toshihiro Shimizu 890ddd
    tzp/tiio_plt.cpp
Toshihiro Shimizu 890ddd
    tzp/tiio_tzp.cpp
Toshihiro Shimizu 890ddd
    tzp/avl.c
Toshihiro Shimizu 890ddd
    tzp/toonzrle.cpp
Toshihiro Shimizu 890ddd
    tzl/tiio_tzl.cpp
Toshihiro Shimizu 890ddd
    mov/tiio_mov_proxy.cpp
Toshihiro Shimizu 890ddd
    3gp/tiio_3gp_proxy.cpp
turtletooth 04d8fd
    ffmpeg/tiio_gif.cpp
turtletooth 04d8fd
    ffmpeg/tiio_webm.cpp
turtletooth 04d8fd
    ffmpeg/tiio_mp4.cpp
turtletooth 04d8fd
    ffmpeg/tiio_ffmpeg.cpp
Jeremy Bullock 764038
    sprite/tiio_sprite.cpp
Campbell Barton 9ece9c
    mesh/tiio_mesh.cpp
Campbell Barton 9ece9c
)
Toshihiro Shimizu 890ddd
429ee8
if(BUILD_TARGET_WIN)
Toshihiro Shimizu 890ddd
    set(HEADERS ${HEADERS}
Toshihiro Shimizu 890ddd
        avi/tiio_avi.h
Toshihiro Shimizu 890ddd
        mov/tiio_mov.h
Campbell Barton 9ece9c
        3gp/tiio_3gp.h
Campbell Barton 9ece9c
    )
Toshihiro Shimizu 890ddd
    set(SOURCES ${SOURCES}
Toshihiro Shimizu 890ddd
        avi/tiio_avi.cpp
Toshihiro Shimizu 890ddd
        mov/tiio_movW.cpp
Campbell Barton 9ece9c
        3gp/tiio_3gpW.cpp
Campbell Barton 9ece9c
    )
429ee8
elseif(BUILD_TARGET_APPLE)
Toshihiro Shimizu 890ddd
    set(HEADERS ${HEADERS}
Toshihiro Shimizu 890ddd
        mov/tiio_movM.h
Campbell Barton 9ece9c
        3gp/tiio_3gpM.h
Campbell Barton 9ece9c
    )
Toshihiro Shimizu 890ddd
    set(SOURCES ${SOURCES}
Toshihiro Shimizu 890ddd
        mov/tiio_movM.cpp
Campbell Barton 9ece9c
        3gp/tiio_3gpM.cpp
Campbell Barton 9ece9c
    )
429ee8
elseif(BUILD_TARGET_UNIX)
Campbell Barton 22fd3b
    set(HEADERS ${HEADERS}
Campbell Barton 22fd3b
        3gp/tiio_3gp_proxy.h
Campbell Barton 9ece9c
        mov/tiio_mov_proxy.h
Campbell Barton 9ece9c
    )
Campbell Barton 22fd3b
    set(SOURCES ${SOURCES}
Campbell Barton 22fd3b
        mov/tiio_mov_proxy.cpp
Campbell Barton 9ece9c
        3gp/tiio_3gp_proxy.cpp
Campbell Barton 9ece9c
    )
Campbell Barton f08982
endif()
Toshihiro Shimizu 890ddd
shun-iwasawa e87e08
add_translation(image ${HEADERS} ${SOURCES})
shun-iwasawa e87e08
Toshihiro Shimizu 890ddd
add_library(image SHARED ${HEADERS} ${SOURCES})
Campbell Barton f2d492
add_definitions(
Campbell Barton f2d492
    -DTNZIMAGE_DLL
Campbell Barton f2d492
    -D_USRDLL
Campbell Barton f2d492
    -DIMAGE_EXPORTS
Campbell Barton f2d492
)
Campbell Barton f2d492
429ee8
if(BUILD_ENV_APPLE)
Toshihiro Shimizu 890ddd
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,-install_name,@rpath/libimage.dylib")
shun-iwasawa 5a2ff6
    add_dependencies(image tnzcore tnzbase toonzlib)
Campbell Barton f08982
endif()
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
message("subdir: image")
Toshihiro Shimizu 890ddd
message("Bin: " ${CMAKE_CURRENT_BINARY_DIR})
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
include_directories(
Campbell Barton a9c3da
    SYSTEM
fukasawa e60969
    ${TIFF_INCLUDE_DIR}
Campbell Barton a9c3da
    ${SDKROOT}/LibJPEG/jpeg-9
Campbell Barton a9c3da
)
Campbell Barton a9c3da
429ee8
if(BUILD_ENV_MSVC)
Campbell Barton a9c3da
    include_directories(
Campbell Barton a9c3da
        SYSTEM
Campbell Barton a9c3da
        ${SDKROOT}/libpng-1.6.21
Campbell Barton a9c3da
    )
429ee8
endif()
429ee8
if(BUILD_TARGET_WIN AND PLATFORM EQUAL 32)
429ee8
    include_directories(
429ee8
        SYSTEM
429ee8
        ${SDKROOT}/quicktime/QT73SDK/CIncludes
429ee8
    )
Toshihiro Shimizu 890ddd
endif()
Toshihiro Shimizu 890ddd
turtletooth 04d8fd
turtletooth 04d8fd
_find_toonz_library(TNZLIBS "tnzcore;tnzbase;toonzlib")
turtletooth 04d8fd
Toshihiro Shimizu 890ddd
429ee8
if(BUILD_ENV_MSVC)
Toshihiro Shimizu 890ddd
    set(EXTRA_LIBS
Toshihiro Shimizu 890ddd
        ${TNZLIBS}
Campbell Barton 9ece9c
        vfw32.lib
Campbell Barton 9ece9c
    )
429ee8
elseif(BUILD_ENV_APPLE)
Campbell Barton f08982
    if(PLATFORM EQUAL 32)
Toshihiro Shimizu 890ddd
        find_library(CORE_SERVICES_LIB CoreServices)
Toshihiro Shimizu 890ddd
        set(OSX_10_6_SDK_PATH "")
Campbell Barton f08982
        if(NOT OSX_10_6_SDK_PATH)
Campbell Barton 9ece9c
            message(FATAL_ERROR "Set variable 'OSX_10_6_SDK_PATH'")
Toshihiro Shimizu 890ddd
        endif()
Toshihiro Shimizu 890ddd
        find_library(QD_LIB
Campbell Barton 9ece9c
            NAMES QD
Campbell Barton 9ece9c
            PATHS OSX10_6_SDK_PATH
Campbell Barton 9ece9c
        )
Toshihiro Shimizu 890ddd
        set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -F ${OSX_10_6_SDK_PATH}")
Toshihiro Shimizu 890ddd
    endif()
Toshihiro Shimizu 890ddd
    set(EXTRA_LIBS
Toshihiro Shimizu 890ddd
        ${TNZLIBS}
Toshihiro Shimizu 890ddd
        ${QT_LIB}
Toshihiro Shimizu 890ddd
        ${CARBON_LIB}
Toshihiro Shimizu 890ddd
        ${CORE_SERVICES_LIB}
Campbell Barton 9ece9c
        ${QD_LIB}
Campbell Barton 9ece9c
    )
429ee8
elseif(BUILD_ENV_UNIXLIKE)
Campbell Barton 22fd3b
    # Generic Unix
Campbell Barton 22fd3b
    set(EXTRA_LIBS
Campbell Barton 9ece9c
        ${TNZLIBS}
Campbell Barton 9ece9c
    )
429ee8
429ee8
    if(BUILD_TARGET_WIN)
429ee8
        set(EXTRA_LIBS ${EXTRA_LIBS} -lvfw32)
429ee8
    endif()
Toshihiro Shimizu 890ddd
endif()
Toshihiro Shimizu 890ddd
turtletooth 04d8fd
target_link_libraries(image Qt5::Core Qt5::Gui Qt5::Network ${Z_LIB} ${GLUT_LIB} ${GL_LIB} ${JPEG_LIB} ${TIFF_LIB} ${PNG_LIB} ${EXTRA_LIBS})