summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.pl@gmail.com>2011-10-27 15:01:19 -0200
committerHugo Parente Lima <hugo.pl@gmail.com>2011-10-27 15:01:19 -0200
commitf3672a77822fc68a2093985be5ff2f597a30bdb7 (patch)
tree3148831dc30f0c0703375b56668389a3d9214f4a
parent1c135f7a59dbcdc798b8200904804bfcf6a050c0 (diff)
downloadpyside-f3672a77822fc68a2093985be5ff2f597a30bdb7.tar.gz
pyside-f3672a77822fc68a2093985be5ff2f597a30bdb7.tar.xz
pyside-f3672a77822fc68a2093985be5ff2f597a30bdb7.zip
Fix bug 1011 - "PySide cygwin patch"
Reviewer: Hugo Parente Lima <hugo.lima@openbossa.org> Marcelo Lira <marcelo.lira@openbossa.org>
-rw-r--r--CMakeLists.txt2
-rw-r--r--PySide/QtCore/qstring_conversions.h2
-rw-r--r--PySide/QtUiTools/CMakeLists.txt6
-rw-r--r--cmake/Macros/PySideModules.cmake2
-rw-r--r--libpyside/PySideConfig-spec.cmake.in2
-rw-r--r--libpyside/pysidemacros.h2
6 files changed, 8 insertions, 8 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index aa2d1e8..c2ece11 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -32,7 +32,7 @@ endif()
if(MSVC)
set(CMAKE_CXX_FLAGS "/Zc:wchar_t- /GR /EHsc /DNOCOLOR /DWIN32 /D_WINDOWS /D_SCL_SECURE_NO_WARNINGS")
else()
- if(CMAKE_HOST_UNIX)
+ if(CMAKE_HOST_UNIX AND NOT CYGWIN)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -fvisibility=hidden -Wno-strict-aliasing")
endif()
set(CMAKE_CXX_FLAGS_DEBUG "-g")
diff --git a/PySide/QtCore/qstring_conversions.h b/PySide/QtCore/qstring_conversions.h
index 975a571..33c393b 100644
--- a/PySide/QtCore/qstring_conversions.h
+++ b/PySide/QtCore/qstring_conversions.h
@@ -23,7 +23,7 @@ struct Converter<QString>
{
if (PyUnicode_Check(pyObj)) {
Py_UNICODE* unicode = PyUnicode_AS_UNICODE(pyObj);
- #if defined(Py_UNICODE_WIDE)
+ #if defined(Py_UNICODE_WIDE) || defined(__CYGWIN__)
// cast as Py_UNICODE can be a different type
return QString::fromUcs4(reinterpret_cast<const uint*>(unicode));
#else
diff --git a/PySide/QtUiTools/CMakeLists.txt b/PySide/QtUiTools/CMakeLists.txt
index 195cb81..85e33c5 100644
--- a/PySide/QtUiTools/CMakeLists.txt
+++ b/PySide/QtUiTools/CMakeLists.txt
@@ -23,10 +23,10 @@ set(QtUiTools_include_dirs ${CMAKE_CURRENT_SOURCE_DIR}
set(QtUiTools_libraries pyside
uiplugin
${SHIBOKEN_PYTHON_LIBRARIES}
- ${QT_QTCORE_LIBRARY}
- ${QT_QTGUI_LIBRARY}
+ ${QT_QTUITOOLS_LIBRARY}
${QT_QTDESIGNER_LIBRARY}
- ${QT_QTUITOOLS_LIBRARY})
+ ${QT_QTCORE_LIBRARY}
+ ${QT_QTGUI_LIBRARY})
set(QtUiTools_deps QtGui QtXml)
create_pyside_module(QtUiTools
QtUiTools_include_dirs
diff --git a/cmake/Macros/PySideModules.cmake b/cmake/Macros/PySideModules.cmake
index 29bea6a..7e57dc9 100644
--- a/cmake/Macros/PySideModules.cmake
+++ b/cmake/Macros/PySideModules.cmake
@@ -39,7 +39,7 @@ macro(create_pyside_module module_name module_include_dir module_libraries modul
set_target_properties(${module_name} PROPERTIES SUFFIX ".pyd")
set(${module_name}_suffix ".pyd")
else()
- set(${module_name}_suffix ".so")
+ set(${module_name}_suffix ${CMAKE_SHARED_MODULE_SUFFIX})
endif()
target_link_libraries(${module_name} ${${module_libraries}})
if(${module_deps})
diff --git a/libpyside/PySideConfig-spec.cmake.in b/libpyside/PySideConfig-spec.cmake.in
index 57ccd31..f363154 100644
--- a/libpyside/PySideConfig-spec.cmake.in
+++ b/libpyside/PySideConfig-spec.cmake.in
@@ -4,6 +4,6 @@
# PYSIDE_TYPESYSTEMS - Type system files that should be used by other bindings extending PySide
SET(PYSIDE_INCLUDE_DIR "@CMAKE_INSTALL_PREFIX@/include/PySide@pyside_SUFFIX@")
-SET(PYSIDE_LIBRARY "@LIB_INSTALL_DIR@/@CMAKE_SHARED_LIBRARY_PREFIX@pyside@pyside_SUFFIX@@LIBRARY_OUTPUT_SUFFIX@@SHIBOKEN_PYTHON_SUFFIX@@CMAKE_SHARED_LIBRARY_SUFFIX@")
+SET(PYSIDE_LIBRARY "@LIB_INSTALL_DIR@/@CMAKE_SHARED_LIBRARY_PREFIX@pyside@pyside_SUFFIX@@LIBRARY_OUTPUT_SUFFIX@@SHIBOKEN_PYTHON_SUFFIX@@CMAKE_IMPORT_LIBRARY_SUFFIX@")
SET(PYSIDE_PYTHONPATH "@SITE_PACKAGE@")
SET(PYSIDE_TYPESYSTEMS "@CMAKE_INSTALL_PREFIX@/share/PySide@pyside_SUFFIX@/typesystems")
diff --git a/libpyside/pysidemacros.h b/libpyside/pysidemacros.h
index a652ba2..fb5914f 100644
--- a/libpyside/pysidemacros.h
+++ b/libpyside/pysidemacros.h
@@ -23,7 +23,7 @@
#ifndef PYSIDEMACROS_H
#define PYSIDEMACROS_H
-#if defined _WIN32 || defined __CYGWIN__
+#if defined _WIN32
#if PYSIDE_EXPORTS
#define PYSIDE_API __declspec(dllexport)
#else