Toshihiro Shimizu 890ddd
set(HEADERS
Toshihiro Shimizu 890ddd
    ../include/service.h
Toshihiro Shimizu 890ddd
    ../../include/tfarmcontroller.h
Toshihiro Shimizu 890ddd
    ../include/tfarmexecutor.h
Toshihiro Shimizu 890ddd
    ../../include/tfarmplatforms.h
Toshihiro Shimizu 890ddd
    ../include/tfarmproxy.h
Toshihiro Shimizu 890ddd
    ../../include/tfarmserver.h
Toshihiro Shimizu 890ddd
    ../../include/tfarmtask.h
Campbell Barton 9ece9c
    ../include/tlog.h
Campbell Barton 9ece9c
)
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
set(SOURCES
Toshihiro Shimizu 890ddd
    service.cpp
Toshihiro Shimizu 890ddd
    tfarmcontroller_c.cpp
Toshihiro Shimizu 890ddd
    tfarmexecutor.cpp
Toshihiro Shimizu 890ddd
    tfarmproxy.cpp
Toshihiro Shimizu 890ddd
    tfarmserver_c.cpp
Toshihiro Shimizu 890ddd
    tfarmserverstub.cpp
Toshihiro Shimizu 890ddd
    tfarmtask.cpp
Toshihiro Shimizu 890ddd
    tlog.cpp
Toshihiro Shimizu 890ddd
    ttcpipclient.cpp
Campbell Barton 9ece9c
    ttcpipserver.cpp
Campbell Barton 9ece9c
)
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
add_library(tfarm SHARED ${HEADERS} ${SOURCES})
Campbell Barton f2d492
add_definitions(
Campbell Barton f2d492
    -DTFARM_EXPORTS
Campbell Barton f2d492
)
Campbell Barton f2d492
429ee8
if(BUILD_ENV_APPLE)
Tact Yoshida 8d13ab
    set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-install_name,@executable_path/libtfarm.dylib")
Campbell Barton f08982
endif()
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
message("subdir: tfarm")
Toshihiro Shimizu 890ddd
message("Bin: " ${CMAKE_CURRENT_BINARY_DIR})
Toshihiro Shimizu 890ddd
Campbell Barton a9c3da
include_directories(
Campbell Barton a9c3da
    ../include
Campbell Barton a9c3da
)
Toshihiro Shimizu 890ddd
429ee8
if(BUILD_ENV_MSVC)
Toshihiro Shimizu 890ddd
    set(EXTRA_LIBS
Toshihiro Shimizu 890ddd
        tnzcore tnzbase toonzlib
Campbell Barton 9ece9c
        ws2_32.lib
Campbell Barton 9ece9c
    )
429ee8
elseif(BUILD_ENV_APPLE)
Toshihiro Shimizu 890ddd
    set(EXTRA_LIBS
John Dancel 83fae9
	    "$<target_file:tnzcore>"</target_file:tnzcore>
John Dancel 83fae9
	    "$<target_file:tnzbase>"</target_file:tnzbase>
John Dancel 83fae9
	    "$<target_file:toonzlib>"</target_file:toonzlib>
Campbell Barton 9ece9c
    )
shun-iwasawa 5a2ff6
    add_dependencies(tfarm tnzcore tnzbase toonzlib tnzext)
429ee8
elseif(BUILD_ENV_UNIXLIKE)
Campbell Barton 22fd3b
    _find_toonz_library(EXTRA_LIBS "tnzcore;tnzbase;toonzlib;tnzext")
429ee8
    if(BUILD_TARGET_WIN)
429ee8
        set(EXTRA_LIBS ${EXTRA_LIBS} -lws2_32)
429ee8
    endif()
Toshihiro Shimizu 890ddd
endif()
Toshihiro Shimizu 890ddd
target_link_libraries(tfarm
Toshihiro Shimizu 890ddd
    Qt5::Core Qt5::Gui Qt5::OpenGL Qt5::Network
Campbell Barton 9ece9c
    ${GLUT_LIB} ${GL_LIB} ${EXTRA_LIBS}
Campbell Barton 9ece9c
)