Merge pull request #901 from mispencer/CygwinDllNameLocation

Cygwin dll extension and installation
This commit is contained in:
Val Markovic 2014-03-20 13:55:39 -07:00
commit f0bbe22fe4
2 changed files with 22 additions and 3 deletions

View File

@ -16,6 +16,13 @@
# along with YouCompleteMe. If not, see <http://www.gnu.org/licenses/>.
cmake_minimum_required( VERSION 2.8 )
# Disable CMake legacy mode for Cygwin, since the build doesn't depend on
# WIN32 being set for Cygwin, and this property being unset causes a
# warning in Cygwin.
# Remove when CMake >= 2.8.4 is required, since that implicitly sets this
set( CMAKE_LEGACY_CYGWIN_WIN32 0 )
project( YouCompleteMe )
option( UNIVERSAL "Build universal mac binary" OFF )

View File

@ -318,9 +318,21 @@ set_target_properties( ${CLIENT_LIB} PROPERTIES PREFIX "")
set_target_properties( ${SERVER_LIB} PROPERTIES PREFIX "")
if ( WIN32 OR CYGWIN )
# This is the extension for compiled Python modules on Windows
set_target_properties( ${CLIENT_LIB} PROPERTIES SUFFIX ".pyd")
set_target_properties( ${SERVER_LIB} PROPERTIES SUFFIX ".pyd")
# DLL platforms put dlls in the RUNTIME_OUTPUT_DIRECTORY
set_target_properties( ${CLIENT_LIB} PROPERTIES
RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/../../python )
set_target_properties( ${SERVER_LIB} PROPERTIES
RUNTIME_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/../../python )
if ( WIN32 )
# This is the extension for compiled Python modules on Windows
set_target_properties( ${CLIENT_LIB} PROPERTIES SUFFIX ".pyd")
set_target_properties( ${SERVER_LIB} PROPERTIES SUFFIX ".pyd")
elseif ( CYGWIN )
# This is the extension for compiled Python modules in Cygwin
set_target_properties( ${CLIENT_LIB} PROPERTIES SUFFIX ".dll")
set_target_properties( ${SERVER_LIB} PROPERTIES SUFFIX ".dll")
endif()
else()
# Even on macs, we want a .so extension instead of a .dylib which is what
# cmake would give us by default. Python won't recognize a .dylib as a module,