summaryrefslogtreecommitdiffstats
path: root/PySide
diff options
context:
space:
mode:
authorAnderson Lizardo <anderson.lizardo@openbossa.org>2010-08-13 22:32:07 -0400
committerAnderson Lizardo <anderson.lizardo@openbossa.org>2010-08-26 11:04:58 -0400
commit3c36d444729ee9285bb4ab0252968057bf904a8d (patch)
treebc5790e5afa2bf2cf1589b7f2fd182f471e4bbee /PySide
parent2593f9fccc71a200c5a802b2e05717910885e864 (diff)
downloadpyside-3c36d444729ee9285bb4ab0252968057bf904a8d.tar.gz
pyside-3c36d444729ee9285bb4ab0252968057bf904a8d.tar.xz
pyside-3c36d444729ee9285bb4ab0252968057bf904a8d.zip
Various cleanups to CMakeLists.txt files
* Simplify endmacro(), endif() and else() statements * Remove unused and redundant code * Use AUTO_OS for holding the typesystem suffix (instead of MODULE_NAME) Reviewed-by: Luciano Wolf <luciano.wolf@openbossa.org> Reviewed-by: Hugo Parente Lima <hugo.lima@openbossa.org>
Diffstat (limited to 'PySide')
-rw-r--r--PySide/CMakeLists.txt6
-rw-r--r--PySide/QtGui/CMakeLists.txt20
-rw-r--r--PySide/QtGui/typesystem_gui.xml.in2
-rw-r--r--PySide/QtMaemo5/CMakeLists.txt4
-rw-r--r--PySide/QtNetwork/CMakeLists.txt5
-rw-r--r--PySide/QtSvg/CMakeLists.txt10
-rw-r--r--PySide/QtTest/CMakeLists.txt1
-rw-r--r--PySide/QtWebKit/CMakeLists.txt3
8 files changed, 13 insertions, 38 deletions
diff --git a/PySide/CMakeLists.txt b/PySide/CMakeLists.txt
index 10e0bc7..d823019 100644
--- a/PySide/CMakeLists.txt
+++ b/PySide/CMakeLists.txt
@@ -4,7 +4,7 @@ install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/__init__.py"
macro(execute_generator module sources typesystem_path)
message("Running generator for ${module}...")
-endmacro(execute_generator)
+endmacro()
macro(create_pyside_module module_name typesystem_file module_include_dir module_libraries module_deps module_typesystem_path module_sources)
add_custom_command(OUTPUT ${${module_sources}}
@@ -42,7 +42,7 @@ macro(create_pyside_module module_name typesystem_file module_include_dir module
DESTINATION include/PySide/${module_name}/)
install(FILES ${typesystem_file}
DESTINATION share/PySide/typesystems)
-endmacro(create_pyside_module)
+endmacro()
# Configure include based on platform
@@ -61,7 +61,7 @@ else()
message(STATUS "${name} NOT found. ${name} support disabled.")
endif()
endif()
-endmacro(HAS_QT_MODULE)
+endmacro()
execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different "${CMAKE_CURRENT_SOURCE_DIR}/__init__.py"
"${CMAKE_BINARY_DIR}/PySide/__init__.py")
diff --git a/PySide/QtGui/CMakeLists.txt b/PySide/QtGui/CMakeLists.txt
index 9d2b897..a848b65 100644
--- a/PySide/QtGui/CMakeLists.txt
+++ b/PySide/QtGui/CMakeLists.txt
@@ -31,32 +31,20 @@ macro(CHECK_QT_GUI_MACRO macro_display_name qt_macro module_sources global_sourc
message(STATUS "Testing support to ${macro_display_name} -- disabled")
endif()
endif()
-endmacro(CHECK_QT_GUI_MACRO)
+endmacro()
if(ENABLE_X11)
- set(MODULE_NAME "x11")
set(SPECIFIC_OS_FILES
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qx11info_wrapper.cpp
)
if(Q_WS_MAEMO_5)
- set(AUTO_OS "MAEMO 5")
- set(MODULE_NAME "maemo")
set(SPECIFIC_OS_FILES
${SPECIFIC_OS_FILES}
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qabstractkineticscroller_wrapper.cpp
)
- endif(Q_WS_MAEMO_5)
-
-elseif(ENABLE_MAC)
- set(MODULE_NAME "mac")
- set(SPECIFIC_OS_FILES
- )
-elseif(ENABLE_WIN)
- set(MODULE_NAME "win")
- set(SPECIFIC_OS_FILES
- )
-endif(ENABLE_X11)
+ endif()
+endif()
if (${QT_VERSION_MAJOR} EQUAL 4 AND ${QT_VERSION_MINOR} LESS 6)
@@ -98,7 +86,7 @@ else()
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qvector3d_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qvector4d_wrapper.cpp
)
-endif (${QT_VERSION_MAJOR} EQUAL 4 AND ${QT_VERSION_MINOR} LESS 6)
+endif ()
set(QtGui_SRC
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtGui/qabstractbutton_wrapper.cpp
diff --git a/PySide/QtGui/typesystem_gui.xml.in b/PySide/QtGui/typesystem_gui.xml.in
index 2dc9676..3ef63d9 100644
--- a/PySide/QtGui/typesystem_gui.xml.in
+++ b/PySide/QtGui/typesystem_gui.xml.in
@@ -1,5 +1,5 @@
<?xml version="1.0"?>
<typesystem package="PySide.QtGui">
<load-typesystem name="typesystem_core.xml" generate="no"/>
- <load-typesystem name="typesystem_gui_@MODULE_NAME@.xml" generate="yes"/>
+ <load-typesystem name="typesystem_gui_@AUTO_OS@.xml" generate="yes"/>
</typesystem>
diff --git a/PySide/QtMaemo5/CMakeLists.txt b/PySide/QtMaemo5/CMakeLists.txt
index fbcf75f..4eb2364 100644
--- a/PySide/QtMaemo5/CMakeLists.txt
+++ b/PySide/QtMaemo5/CMakeLists.txt
@@ -17,11 +17,11 @@ set(QtMaemo5_typesystem_path "${CMAKE_CURRENT_BINARY_DIR}:${QtCore_SOURCE_DIR}:$
if(NOT QT_QTMAEMO5_INCLUDE_DIR)
FIND_PATH(QT_QTMAEMO5_INCLUDE_DIR QtMaemo5
PATHS ${QT_HEADERS_DIR}/QtMaemo5 NO_DEFAULT_PATH)
-endif(NOT QT_QTMAEMO5_INCLUDE_DIR)
+endif()
if(NOT QT_QTMAEMO5_LIBRARY)
FIND_LIBRARY(QT_QTMAEMO5_LIBRARY QtMaemo5
PATHS ${QT_LIBRARY_DIR} NO_DEFAULT_PATH)
-endif(NOT QT_QTMAEMO5_LIBRARY)
+endif()
set(QtMaemo5_include_dirs ${CMAKE_CURRENT_SOURCE_DIR}
${QT_QTCORE_INCLUDE_DIR}
diff --git a/PySide/QtNetwork/CMakeLists.txt b/PySide/QtNetwork/CMakeLists.txt
index 1550499..0d89e28 100644
--- a/PySide/QtNetwork/CMakeLists.txt
+++ b/PySide/QtNetwork/CMakeLists.txt
@@ -31,8 +31,7 @@ macro(CHECK_QT_NETWORK_MACRO macro_display_name qt_macro module_sources global_s
message(STATUS "Testing support to ${macro_display_name} -- disabled")
endif()
endif()
-endmacro(CHECK_QT_NETWORK_MACRO)
-
+endmacro()
if (${QT_VERSION_MAJOR} EQUAL 4 AND ${QT_VERSION_MINOR} GREATER 6)
set (QtNetwork_47_SRC
@@ -71,7 +70,7 @@ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qtcpsocket_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qtnetwork_module_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qudpsocket_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtNetwork/qurlinfo_wrapper.cpp
-${SPECIFIC_OS_FILES}
+
${QtNetwork_47_SRC}
)
diff --git a/PySide/QtSvg/CMakeLists.txt b/PySide/QtSvg/CMakeLists.txt
index a56ee33..bd67536 100644
--- a/PySide/QtSvg/CMakeLists.txt
+++ b/PySide/QtSvg/CMakeLists.txt
@@ -1,21 +1,11 @@
project(QtSvg)
-if (${QT_VERSION_MAJOR} EQUAL 4 AND ${QT_VERSION_MINOR} LESS 6)
- set (QtSvg_46_SRC )
-else ()
- set(QtSvg_46_SRC
- )
-endif (${QT_VERSION_MAJOR} EQUAL 4 AND ${QT_VERSION_MINOR} LESS 6)
-
set(QtSvg_SRC
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtSvg/qgraphicssvgitem_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtSvg/qsvggenerator_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtSvg/qsvgrenderer_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtSvg/qsvgwidget_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtSvg/qtsvg_module_wrapper.cpp
-
-${SPECIFIC_OS_FILES}
-${QtSvg_46_SRC}
)
set(QtSvg_typesystem_path "${CMAKE_CURRENT_BINARY_DIR}:${QtCore_SOURCE_DIR}:${QtGui_SOURCE_DIR}:${QtGui_BINARY_DIR}")
diff --git a/PySide/QtTest/CMakeLists.txt b/PySide/QtTest/CMakeLists.txt
index 4bf0bca..cb9e4d5 100644
--- a/PySide/QtTest/CMakeLists.txt
+++ b/PySide/QtTest/CMakeLists.txt
@@ -3,7 +3,6 @@ project(QtTest)
set(QtTest_SRC
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtTest/qtest_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtTest/qttest_module_wrapper.cpp
-${SPECIFIC_OS_FILES}
)
set(QtTest_typesystem_path "${CMAKE_CURRENT_BINARY_DIR}:${QtCore_SOURCE_DIR}:${QtGui_SOURCE_DIR}:${QtGui_BINARY_DIR}")
diff --git a/PySide/QtWebKit/CMakeLists.txt b/PySide/QtWebKit/CMakeLists.txt
index 9039835..f2ca036 100644
--- a/PySide/QtWebKit/CMakeLists.txt
+++ b/PySide/QtWebKit/CMakeLists.txt
@@ -9,7 +9,7 @@ else ()
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebKit/qwebinspector_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebKit/qgraphicswebview_wrapper.cpp
)
-endif (${QT_VERSION_MAJOR} EQUAL 4 AND ${QT_VERSION_MINOR} LESS 6)
+endif ()
set(QtWebKit_SRC
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebKit/qtwebkit_module_wrapper.cpp
@@ -28,7 +28,6 @@ ${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebKit/qwebsettings_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebKit/qwebview_wrapper.cpp
${CMAKE_CURRENT_BINARY_DIR}/PySide/QtWebKit/webcore_wrapper.cpp
-${SPECIFIC_OS_FILES}
${QtWebKit_46_SRC}
)