Toshihiro Shimizu 890ddd
set(MOC_HEADERS
Toshihiro Shimizu 890ddd
    ../include/tcacheresourcepool.h
Toshihiro Shimizu 890ddd
    ../common/tfx/trendererP.h)
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
set(HEADERS ${MOC_HEADERS}
Toshihiro Shimizu 890ddd
    ../common/twain/ttwain.h
Toshihiro Shimizu 890ddd
    ../common/twain/ttwain_capability.h
Toshihiro Shimizu 890ddd
    ../common/twain/ttwain_conversion.h
Toshihiro Shimizu 890ddd
    ../common/twain/ttwain_error.h
Toshihiro Shimizu 890ddd
    ../common/twain/ttwain_global_def.h
Toshihiro Shimizu 890ddd
    ../common/twain/ttwain_state.h
Toshihiro Shimizu 890ddd
    ../common/twain/ttwain_statePD.h
Toshihiro Shimizu 890ddd
    ../common/twain/ttwain_util.h
Toshihiro Shimizu 890ddd
    ../common/twain/ttwain_utilP.h
Toshihiro Shimizu 890ddd
    ../common/twain/ttwain_utilPD.h
Toshihiro Shimizu 890ddd
    ../common/twain/ttwain_win.h
Toshihiro Shimizu 890ddd
    ../common/twain/ttwain_winPD.h
Toshihiro Shimizu 890ddd
    ../common/twain/ttwainP.h
Toshihiro Shimizu 890ddd
    ../common/twain/twain.h
Toshihiro Shimizu 890ddd
    ../include/permissionsmanager.h
Toshihiro Shimizu 890ddd
    ../include/tscanner.h
Toshihiro Shimizu 890ddd
    tscanner/tscannerdevice.h
Toshihiro Shimizu 890ddd
    tscanner/tscannerutil.h
Toshihiro Shimizu 890ddd
    tscanner/tscannerepson.h
Toshihiro Shimizu 890ddd
    tscanner/tscannertwain.h
Toshihiro Shimizu 890ddd
    tscanner/TScannerIO/TScannerIO.h
Toshihiro Shimizu 890ddd
    tscanner/TScannerIO/TUSBScannerIO.h
Toshihiro Shimizu 890ddd
    ../include/tcubicbezier.h
Toshihiro Shimizu 890ddd
    ../include/tdoublekeyframe.h
Toshihiro Shimizu 890ddd
    ../include/tdoubleparam.h
Toshihiro Shimizu 890ddd
    ../common/tparam/tdoubleparamfile.h
Toshihiro Shimizu 890ddd
    ../include/tdoubleparamrelayproperty.h
Toshihiro Shimizu 890ddd
    ../include/tfxparam.h
Toshihiro Shimizu 890ddd
    ../include/tnotanimatableparam.h
Toshihiro Shimizu 890ddd
    ../include/tparam.h
Toshihiro Shimizu 890ddd
    ../include/tparamchange.h
Toshihiro Shimizu 890ddd
    ../include/tparamcontainer.h
Toshihiro Shimizu 890ddd
    ../include/tparamset.h
Toshihiro Shimizu 890ddd
    ../include/tspectrumparam.h
Toshihiro Shimizu 890ddd
    ../include/tstepparam.h
Toshihiro Shimizu 890ddd
    ../include/ttonecurveparam.h
Toshihiro Shimizu 890ddd
    ../include/tcolumnset.h
Toshihiro Shimizu 890ddd
    ../include/tbasefx.h
Toshihiro Shimizu 890ddd
    ../include/texternfx.h
Toshihiro Shimizu 890ddd
    ../include/tfx.h
Toshihiro Shimizu 890ddd
    ../include/tfxattributes.h
Toshihiro Shimizu 890ddd
    ../include/tcacheresource.h
Toshihiro Shimizu 890ddd
    ../include/tpassivecachemanager.h
Toshihiro Shimizu 890ddd
    ../include/tpredictivecachemanager.h
Toshihiro Shimizu 890ddd
    ../include/tfxcachemanager.h
Toshihiro Shimizu 890ddd
    ../include/tfxutil.h
Toshihiro Shimizu 890ddd
    ../include/tmacrofx.h
Toshihiro Shimizu 890ddd
    ../include/trenderer.h
Toshihiro Shimizu 890ddd
    ../include/trenderresourcemanager.h
Toshihiro Shimizu 890ddd
    ../include/ttzpimagefx.h
Toshihiro Shimizu 890ddd
    ../include/tcli.h
Toshihiro Shimizu 890ddd
    ../include/tcolorutils.h
Toshihiro Shimizu 890ddd
    ../include/tparamundo.h
Toshihiro Shimizu 890ddd
    ../include/ttimer.h
Toshihiro Shimizu 890ddd
    ../include/ttest.h
Toshihiro Shimizu 890ddd
    ../include/texpression.h
Toshihiro Shimizu 890ddd
    ../include/tgrammar.h
Toshihiro Shimizu 890ddd
    ../include/tparser.h
Toshihiro Shimizu 890ddd
    ../include/ttokenizer.h
Toshihiro Shimizu 890ddd
    ../include/tunit.h
Toshihiro Shimizu 890ddd
    ../include/tzeraryfx.h)
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
set(SOURCES
Toshihiro Shimizu 890ddd
    permissionsmanager.cpp
Toshihiro Shimizu 890ddd
    stringtable.cpp
Toshihiro Shimizu 890ddd
    ../common/tparam/tcubicbezier.cpp
Toshihiro Shimizu 890ddd
    ../common/tparam/tdoublekeyframe.cpp
Toshihiro Shimizu 890ddd
    ../common/tparam/tdoubleparam.cpp
Toshihiro Shimizu 890ddd
    ../common/tparam/tdoubleparamfile.cpp
Toshihiro Shimizu 890ddd
    ../common/tparam/tdoubleparamrelayproperty.cpp
Toshihiro Shimizu 890ddd
    ../common/tparam/tnotanimatableparam.cpp
Toshihiro Shimizu 890ddd
    ../common/tparam/tparam.cpp
Toshihiro Shimizu 890ddd
    ../common/tparam/tparamcontainer.cpp
Toshihiro Shimizu 890ddd
    ../common/tparam/tparamset.cpp
Toshihiro Shimizu 890ddd
    ../common/tparam/tpixelparam.cpp
Toshihiro Shimizu 890ddd
    ../common/tparam/tpointparam.cpp
Toshihiro Shimizu 890ddd
    ../common/tparam/trangeparam.cpp
Toshihiro Shimizu 890ddd
    ../common/tparam/tspectrumparam.cpp
Toshihiro Shimizu 890ddd
    ../common/tparam/tstepparam.cpp
Toshihiro Shimizu 890ddd
    ../common/tparam/ttonecurveparam.cpp
Toshihiro Shimizu 890ddd
    ../common/txsheet/tcolumnset.cpp
Toshihiro Shimizu 890ddd
    ../common/tfx/binaryFx.cpp
Toshihiro Shimizu 890ddd
    texternfx.cpp
Toshihiro Shimizu 890ddd
    ../common/TFx/tfx.cpp
Toshihiro Shimizu 890ddd
    ../common/tfx/tfxcachemanager.cpp
Toshihiro Shimizu 890ddd
    ../common/tfx/tcacheresource.cpp
Toshihiro Shimizu 890ddd
    ../common/tfx/tcacheresourcepool.cpp
Toshihiro Shimizu 890ddd
    ../common/tfx/tpassivecachemanager.cpp
Toshihiro Shimizu 890ddd
    ../common/tfx/tpredictivecachemanager.cpp
Toshihiro Shimizu 890ddd
    tfxattributes.cpp
Toshihiro Shimizu 890ddd
    tfxutil.cpp
Toshihiro Shimizu 890ddd
    ../common/tfx/tmacrofx.cpp
Toshihiro Shimizu 890ddd
    trasterfx.cpp
Toshihiro Shimizu 890ddd
    ../common/tfx/trenderer.cpp
Toshihiro Shimizu 890ddd
    ../common/tfx/trenderresourcemanager.cpp
Toshihiro Shimizu 890ddd
    ../common/TFx/ttzpimagefx.cpp
Toshihiro Shimizu 890ddd
    ../common/tfx/unaryFx.cpp
Toshihiro Shimizu 890ddd
    ../common/tfx/zeraryFx.cpp
Toshihiro Shimizu 890ddd
    ../common/tapptools/tcli.cpp
Toshihiro Shimizu 890ddd
    ../common/tapptools/tcolorutils.cpp
Toshihiro Shimizu 890ddd
    ../common/tapptools/tparamundo.cpp
Toshihiro Shimizu 890ddd
    ../common/tapptools/ttimer.cpp
Toshihiro Shimizu 890ddd
    ../common/ttest/ttest.cpp
Toshihiro Shimizu 890ddd
    ../common/expressions/texpression.cpp
Toshihiro Shimizu 890ddd
    ../common/expressions/tgrammar.cpp
Toshihiro Shimizu 890ddd
    ../common/expressions/tparser.cpp
Toshihiro Shimizu 890ddd
    ../common/expressions/ttokenizer.cpp
Toshihiro Shimizu 890ddd
    ../common/tunit/tunit.cpp
Toshihiro Shimizu 890ddd
    tscanner/tscannerutil.cpp
Toshihiro Shimizu 890ddd
    tscanner/tscannerepson.cpp)
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
if (WIN32)
Toshihiro Shimizu 890ddd
    set(SOURCES ${SOURCES}
Toshihiro Shimizu 890ddd
        tscanner/TScannerIO/TUSBScannerIO_W.cpp)
Toshihiro Shimizu 890ddd
else ()
Toshihiro Shimizu 890ddd
    set(SOURCES ${SOURCES}
Toshihiro Shimizu 890ddd
        tscanner/TScannerIO/TUSBScannerIO_M.cpp)
Toshihiro Shimizu 890ddd
endif ()
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
set(OBJCSOURCES
Toshihiro Shimizu 890ddd
    ../common/twain/ttwain_capability.c
Toshihiro Shimizu 890ddd
    ../common/twain/ttwain_conversion.c
Toshihiro Shimizu 890ddd
    ../common/twain/ttwain_error.c
Toshihiro Shimizu 890ddd
    ../common/twain/ttwain_state.c
Toshihiro Shimizu 890ddd
    ../common/twain/ttwain_util.c
Toshihiro Shimizu 890ddd
    ../common/twain/ttwain_win.c
Toshihiro Shimizu 890ddd
    tscanner/tscanner.cpp
Toshihiro Shimizu 890ddd
    tscanner/tscannertwain.cpp)
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
if (WIN32)
Toshihiro Shimizu 890ddd
    set(OBJCSOURCES ${OBJCSOURCES}
Toshihiro Shimizu 890ddd
        ../common/twain/ttwain_stateW.c
Toshihiro Shimizu 890ddd
        ../common/twain/ttwain_utilW.c
Toshihiro Shimizu 890ddd
        ../common/twain/ttwain_winW.c)
Toshihiro Shimizu 890ddd
else ()
Toshihiro Shimizu 890ddd
    set(OBJCSOURCES ${OBJCSOURCES}
Toshihiro Shimizu 890ddd
        ../common/twain/ttwain_stateM.c
Toshihiro Shimizu 890ddd
        ../common/twain/ttwain_utilM.c
Toshihiro Shimizu 890ddd
        ../common/twain/ttwain_winM.c)
Toshihiro Shimizu 890ddd
endif ()
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
if(APPLE)
Toshihiro Shimizu 890ddd
    #set_source_files_properties(${OBJCSOURCES} PROPERTIES LANGUAGE OBJCXX)
Toshihiro Shimizu 890ddd
    set_source_files_properties(${OBJCSOURCES} PROPERTIES COMPILE_FLAGS "-x objective-c++")
Toshihiro Shimizu 890ddd
endif()
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
qt5_wrap_cpp(SOURCES ${MOC_HEADERS})
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
add_library(tnzbase SHARED ${HEADERS} ${SOURCES} ${OBJCSOURCES})
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
if (APPLE)
Toshihiro Shimizu 890ddd
    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,-install_name,@rpath/libtnzbase.dylib")
Toshihiro Shimizu 890ddd
endif (APPLE)
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
add_definitions(-DTNZBASE_EXPORTS -DTPARAM_EXPORTS -DTXSHEET_EXPORTS -DTFX_EXPORTS -DTAPPTOOLS_EXPORTS -DTTEST_EXPORTS)
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
message("subdir: tnzbase")
Toshihiro Shimizu 890ddd
message("Bin: " ${CMAKE_CURRENT_BINARY_DIR})
Toshihiro Shimizu 890ddd
#message("Lib: " ${LIBRARY_OUTPUT_PATH})
Toshihiro Shimizu 890ddd
#message("Exe: " ${EXECUTABLE_OUTPUT_PATH})
Toshihiro Shimizu 890ddd
#message("Sources:" ${SOURCES})
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
include_directories(../common/flash ${SDKROOT}/libusb/libusb-1.0.9/include)
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
if(WIN32)
Toshihiro Shimizu 890ddd
    set(EXTRA_LIBS
Toshihiro Shimizu 890ddd
        tnzcore)
Toshihiro Shimizu 890ddd
else()
Toshihiro Shimizu 890ddd
    find_library(TWAIN_LIB TWAIN)
Toshihiro Shimizu 890ddd
    find_library(IOKIT_LIB IOKit)
Toshihiro Shimizu 890ddd
    find_library(COCOA_LIB Cocoa)
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
    set(EXTRA_LIBS
Toshihiro Shimizu 890ddd
        ${CMAKE_CURRENT_BINARY_DIR}/../tnzcore/libtnzcore.dylib
Toshihiro Shimizu 890ddd
        ${USB_LIB}
Toshihiro Shimizu 890ddd
        ${TWAIN_LIB}
Toshihiro Shimizu 890ddd
        ${IOKIT_LIB}
Toshihiro Shimizu 890ddd
        ${COCOA_LIB})
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
    target_link_libraries(tnzbase Qt5::Core Qt5::Gui)
Toshihiro Shimizu 890ddd
endif()
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
target_link_libraries(tnzbase Qt5::Core Qt5::Gui ${EXTRA_LIBS})