diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt index c53299d265b..8f40b1c22cf 100644 --- a/python/CMakeLists.txt +++ b/python/CMakeLists.txt @@ -8,6 +8,11 @@ file(GLOB_RECURSE python_srcs ${PROJECT_SOURCE_DIR}/python/*.cpp) add_library(pycaffe SHARED ${python_srcs}) caffe_default_properties(pycaffe) set_target_properties(pycaffe PROPERTIES PREFIX "" OUTPUT_NAME "_caffe") +if(MSVC) + set_target_properties(pycaffe PROPERTIES SUFFIX ".pyd") +elseif(APPLE) + set_target_properties(pycaffe PROPERTIES SUFFIX ".so") +endif() target_include_directories(pycaffe PUBLIC ${PYTHON_INCLUDE_DIRS} ${NUMPY_INCLUDE_DIR}) target_link_libraries(pycaffe PUBLIC ${Caffe_LINK} ${PYTHON_LIBRARIES})