CMakeLists.txt 611 字节
Newer Older
1 2 3 4
include_directories(src)
file (GLOB_RECURSE SOURCES src/*.cpp main.cpp)
add_executable (load_and_run  ${SOURCES})

5 6 7 8 9 10 11
if (WIN32) 
    # Windows does not support implicitly importing data members from DLL.
    target_link_libraries(load_and_run megbrain megdnn)
else()
    target_link_libraries (load_and_run megengine)
endif()
install (TARGETS load_and_run EXPORT ${MGE_EXPORT_TARGETS} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
12 13 14

if(MGE_WITH_TEST)
    add_executable(json_loader_test test/json_loader_test.cpp src/json_loader.h src/json_loader.cpp)
15
    target_link_libraries (json_loader_test megengine)
16
endif()