diff --git a/.gitignore b/.gitignore index 1551bc2a2..01c70b791 100644 --- a/.gitignore +++ b/.gitignore @@ -5,7 +5,7 @@ cmake_install.cmake .DS_Store /example/example.so /example/example.pyd -/example/example.dll +/example/example*.dll *.sln *.sdf *.opensdf diff --git a/CMakeLists.txt b/CMakeLists.txt index b25504596..aaa97e8a5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 SUFFIX "${PYTHON_MODULE_EXTENSION}") - if(WIN32) + if(WIN32 OR CYGWIN) # Link against the Python shared library on Windows target_link_libraries(${target_name} PRIVATE ${PYTHON_LIBRARIES}) elseif(APPLE)