Merge pull request #217 from BorisSchaeling/cygwin

Fix Cygwin support
This commit is contained in:
Wenzel Jakob 2016-05-29 22:09:24 +02:00
commit dca6b04c5f
2 changed files with 2 additions and 2 deletions

2
.gitignore vendored
View File

@ -5,7 +5,7 @@ cmake_install.cmake
.DS_Store .DS_Store
/example/example.so /example/example.so
/example/example.pyd /example/example.pyd
/example/example.dll /example/example*.dll
*.sln *.sln
*.sdf *.sdf
*.opensdf *.opensdf

View File

@ -61,7 +61,7 @@ function(pybind11_add_module target_name)
set_target_properties(${target_name} PROPERTIES PREFIX "${PYTHON_MODULE_PREFIX}") set_target_properties(${target_name} PROPERTIES PREFIX "${PYTHON_MODULE_PREFIX}")
set_target_properties(${target_name} PROPERTIES SUFFIX "${PYTHON_MODULE_EXTENSION}") set_target_properties(${target_name} PROPERTIES SUFFIX "${PYTHON_MODULE_EXTENSION}")
if(WIN32) if(WIN32 OR CYGWIN)
# Link against the Python shared library on Windows # Link against the Python shared library on Windows
target_link_libraries(${target_name} PRIVATE ${PYTHON_LIBRARIES}) target_link_libraries(${target_name} PRIVATE ${PYTHON_LIBRARIES})
elseif(APPLE) elseif(APPLE)