Toshihiro Shimizu 890ddd
set(HEADERS
Toshihiro Shimizu 890ddd
    ../include/ext/ContextStatus.h
Toshihiro Shimizu 890ddd
    ../include/ext/ExtUtil.h
Toshihiro Shimizu 890ddd
    ../include/ext/Selector.h
Toshihiro Shimizu 890ddd
    ../include/ext/StrokeParametricDeformer.h
Toshihiro Shimizu 890ddd
    ../include/ext/Types.h
Toshihiro Shimizu 890ddd
    ../include/ext/Designer.h
Toshihiro Shimizu 890ddd
    ../include/ext/OverallDesigner.h
Toshihiro Shimizu 890ddd
    ../include/ext/CornerDeformation.h
Toshihiro Shimizu 890ddd
    ../include/ext/SmoothDeformation.h
Toshihiro Shimizu 890ddd
    ../include/ext/StraightCornerDeformation.h
Toshihiro Shimizu 890ddd
    ../include/ext/StrokeDeformation.h
Toshihiro Shimizu 890ddd
    ../include/ext/StrokeDeformationImpl.h
Toshihiro Shimizu 890ddd
    ../include/ext/LinearPotential.h
Toshihiro Shimizu 890ddd
    ../include/ext/NotSimmetricBezierPotential.h
Toshihiro Shimizu 890ddd
    ../include/ext/NotSimmetricExpPotential.h
Toshihiro Shimizu 890ddd
    ../include/ext/Potential.h
Toshihiro Shimizu 890ddd
    ../include/ext/SquarePotential.h
Toshihiro Shimizu 890ddd
    DeformationSelector.h
Toshihiro Shimizu 890ddd
    ../include/ext/meshbuilder.h
Toshihiro Shimizu 890ddd
    ../include/ext/meshtexturizer.h
Toshihiro Shimizu 890ddd
    ../include/ext/meshutils.h
Toshihiro Shimizu 890ddd
    ../include/ext/plasticdeformer.h
Toshihiro Shimizu 890ddd
    ../include/ext/plasticdeformerstorage.h
Toshihiro Shimizu 890ddd
    ../include/ext/plastichandle.h
Toshihiro Shimizu 890ddd
    ../include/ext/plasticskeleton.h
Toshihiro Shimizu 890ddd
    ../include/ext/plasticskeletondeformation.h
Toshihiro Shimizu 890ddd
    ../include/ext/plasticvisualsettings.h
Toshihiro Shimizu 890ddd
    ../include/ext/ttexturesstorage.h
Toshihiro Shimizu 890ddd
    ../include/tlin/cblas.h
Toshihiro Shimizu 890ddd
    ../include/tlin/tlin.h
Toshihiro Shimizu 890ddd
    ../include/tlin/tlin_basicops.h
Toshihiro Shimizu 890ddd
    ../include/tlin/tlin_cblas_wrap.h
Toshihiro Shimizu 890ddd
    ../include/tlin/tlin_matrix.h
Toshihiro Shimizu 890ddd
    ../include/tlin/tlin_sparsemat.h
Toshihiro Shimizu 890ddd
    ../include/tlin/tlin_superlu_wrap.h
Toshihiro Shimizu 890ddd
    ../include/tlin/tlin_vector.h)
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
set(SOURCES
Toshihiro Shimizu 890ddd
    ContextStatus.cpp
Toshihiro Shimizu 890ddd
    DeformationSelector.cpp
Toshihiro Shimizu 890ddd
    ExtUtil.cpp
Toshihiro Shimizu 890ddd
    Selector.cpp
Toshihiro Shimizu 890ddd
    StrokeParametricDeformer.cpp
Toshihiro Shimizu 890ddd
    Types.cpp
Toshihiro Shimizu 890ddd
    LinearPotential.cpp
Toshihiro Shimizu 890ddd
    NotSimmetricBezierPotential.cpp
Toshihiro Shimizu 890ddd
    NotSimmetricExpPotential.cpp
Toshihiro Shimizu 890ddd
    Potential.cpp
Toshihiro Shimizu 890ddd
    SquarePotential.cpp
Toshihiro Shimizu 890ddd
    CornerDeformation.cpp
Toshihiro Shimizu 890ddd
    SmoothDeformation.cpp
Toshihiro Shimizu 890ddd
    StraightCornerDeformation.cpp
Toshihiro Shimizu 890ddd
    StrokeDeformation.cpp
Toshihiro Shimizu 890ddd
    StrokeDeformationImpl.cpp
Toshihiro Shimizu 890ddd
    Designer.cpp
Toshihiro Shimizu 890ddd
    OverallDesigner.cpp
Toshihiro Shimizu 890ddd
    meshbuilder.cpp
Toshihiro Shimizu 890ddd
    meshtexturizer.cpp
Toshihiro Shimizu 890ddd
    meshutils.cpp
Toshihiro Shimizu 890ddd
    plasticdeformer.cpp
Toshihiro Shimizu 890ddd
    plasticdeformerstorage.cpp
Toshihiro Shimizu 890ddd
    plastichandle.cpp
Toshihiro Shimizu 890ddd
    plasticskeleton.cpp
Toshihiro Shimizu 890ddd
    plasticskeletondeformation.cpp
Toshihiro Shimizu 890ddd
    ttexturesstorage.cpp
Toshihiro Shimizu 890ddd
    tlin/tlin_cblas_wrap.cpp
Toshihiro Shimizu 890ddd
    tlin/tlin_superlu_wrap.cpp)
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
if(WIN32 AND PLATFORM EQUAL 32)
Toshihiro Shimizu 890ddd
    # can not link libopenblas_32.lib with SAFESEH
Toshihiro Shimizu 890ddd
    set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /SAFESEH:NO")
Toshihiro Shimizu 890ddd
endif()
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
add_library(tnzext SHARED ${HEADERS} ${SOURCES} ${OBJCSOURCES})
Toshihiro Shimizu 890ddd
Campbell Barton f08982
if(APPLE)
Toshihiro Shimizu 890ddd
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,-install_name,@rpath/libtnzext.dylib")
Campbell Barton f08982
endif()
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
add_definitions(-DTNZEXT_EXPORTS)
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
message("subdir: tnzext")
Toshihiro Shimizu 890ddd
message("Bin: " ${CMAKE_CURRENT_BINARY_DIR})
Toshihiro Shimizu 890ddd
Campbell Barton f08982
if(APPLE)
Campbell Barton f08982
    find_library(ACCE_LIB Accelerate)
Campbell Barton f08982
endif()
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
include_directories(${SDKROOT}/superlu/SuperLU_4.1/SRC)
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
if(WIN32)
Toshihiro Shimizu 890ddd
    target_link_libraries(tnzext
Toshihiro Shimizu 890ddd
        Qt5::Core Qt5::Gui Qt5::OpenGL Qt5::Network
Toshihiro Shimizu 890ddd
        ${GLUT_LIB} ${GL_LIB} ${SUPERLU_LIB} ${OPENBLAS_LIB} ${EXTRA_LIBS}
Toshihiro Shimizu 890ddd
        tnzcore tnzbase)
Campbell Barton 22fd3b
elseif(APPLE)
Toshihiro Shimizu 890ddd
    set(EXTRA_LIBS
Toshihiro Shimizu 890ddd
        ${CMAKE_CURRENT_BINARY_DIR}/../tnzcore/libtnzcore.dylib
Toshihiro Shimizu 890ddd
        ${CMAKE_CURRENT_BINARY_DIR}/../tnzbase/libtnzbase.dylib)
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
    target_link_libraries(tnzext
Toshihiro Shimizu 890ddd
        Qt5::Core Qt5::Gui Qt5::OpenGL Qt5::Network
Toshihiro Shimizu 890ddd
        ${ACCE_LIB} ${GLUT_LIB} ${GL_LIB} ${SUPERLU_LIB} ${EXTRA_LIBS})
Campbell Barton 22fd3b
elseif(UNIX)
Campbell Barton 22fd3b
    _find_toonz_library(EXTRA_LIBS "tnzcore;tnzbase")
Campbell Barton 22fd3b
Campbell Barton 22fd3b
    set(EXTRA_LIBS ${EXTRA_LIBS} ${OPENBLAS_LIB})
Campbell Barton 22fd3b
Campbell Barton 22fd3b
    target_link_libraries(tnzext
Campbell Barton 22fd3b
        Qt5::Core Qt5::Gui Qt5::OpenGL Qt5::Network
Campbell Barton 22fd3b
        ${GLUT_LIB} ${GL_LIB} ${SUPERLU_LIB} ${EXTRA_LIBS})
Toshihiro Shimizu 890ddd
endif()