CMakeLists.txt 668 字节
Newer Older
S
sangoly 已提交
1 2
set(PYBIND_DEPS pybind python paddle_api_light paddle_api)
if (NOT LITE_ON_TINY_PUBLISH)
3
   set(PYBIND_DEPS ${PYBIND_DEPS} paddle_api_full opt_base)
S
sangoly 已提交
4 5
endif()

6 7 8 9 10 11
if(WIN32)
   lite_cc_library(lite_pybind SHARED SRCS pybind.cc DEPS ${PYBIND_DEPS})
   get_property (os_dependency_modules GLOBAL PROPERTY OS_DEPENDENCY_MODULES)
   target_link_libraries(lite_pybind ${os_dependency_modules})
else()
   lite_cc_library(lite_pybind SHARED SRCS pybind.cc DEPS ${PYBIND_DEPS})
12
   target_sources(lite_pybind PUBLIC ${__lite_cc_files} fbs_headers)
13 14
endif(WIN32)

H
huzhiqiang 已提交
15 16 17
if (LITE_ON_TINY_PUBLISH)
   set_target_properties(lite_pybind PROPERTIES COMPILE_FLAGS "-flto -fdata-sections")
endif()