@@ -46,7 +46,7 @@ endforeach()
46
46
47
47
# Force option if it applies
48
48
if (PythonQt_Wrap_QtAll)
49
- list (REMOVE_ITEM qtlibs xmlpatterns) # xmlpatterns wrapper does *NOT* build at all :(
49
+ list (REMOVE_ITEM qtlibs xmlpatterns) # xmlpatterns wrapper does *NOT* build at all :(
50
50
foreach (qtlib ${qtlibs} )
51
51
if (NOT ${PythonQt_Wrap_Qt${qtlib} })
52
52
set (PythonQt_Wrap_Qt${qtlib} ON CACHE BOOL "Make all of Qt${qtlib} available in python" FORCE)
@@ -76,7 +76,7 @@ if(QT4_FOUND)
76
76
if (${found_qt_version} VERSION_LESS ${minimum_required_qt_version} )
77
77
message (FATAL_ERROR "error: PythonQt requires Qt >= ${minimum_required_qt_version} -- you cannot use Qt ${found_qt_version} ." )
78
78
endif ()
79
-
79
+
80
80
# Enable required qt module
81
81
foreach (qtlib network opengl sql svg uitools webkit xml xmlpatterns)
82
82
string (TOUPPER ${qtlib} qtlib_uppercase)
94
94
endif ()
95
95
96
96
#-----------------------------------------------------------------------------
97
- # The variable "generated_cpp_suffix" allows to conditionnally compile the generated wrappers
97
+ # The variable "generated_cpp_suffix" allows to conditionnally compile the generated wrappers
98
98
# associated with the Qt version being used.
99
99
set (generated_cpp_suffix "_${QT_VERSION_MAJOR}${QT_VERSION_MINOR} " )
100
100
if ("${generated_cpp_suffix} " STREQUAL "_46" )
@@ -123,7 +123,7 @@ set(sources
123
123
src/PythonQtStdIn.cpp
124
124
src/PythonQtStdOut.cpp
125
125
src/gui/PythonQtScriptingConsole.cpp
126
-
126
+
127
127
generated_cpp${generated_cpp_suffix} /PythonQt_QtBindings.cpp
128
128
129
129
generated_cpp${generated_cpp_suffix} /com_trolltech_qt_core_builtin/com_trolltech_qt_core_builtin0.cpp
@@ -178,27 +178,27 @@ set(moc_sources
178
178
#-----------------------------------------------------------------------------
179
179
# Add extra sources
180
180
foreach (qtlib core gui network opengl sql svg uitools webkit xml xmlpatterns)
181
-
181
+
182
182
if (${PythonQt_Wrap_Qt${qtlib} })
183
-
183
+
184
184
ADD_DEFINITIONS (-DPYTHONQT_WRAP_Qt${qtlib} )
185
-
185
+
186
186
set (file_prefix generated_cpp${generated_cpp_suffix} /com_trolltech_qt_${qtlib} /com_trolltech_qt_${qtlib} )
187
-
187
+
188
188
foreach (index RANGE 0 11)
189
-
189
+
190
190
# Source files
191
191
if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR} /${file_prefix}${index} .cpp)
192
192
list (APPEND sources ${file_prefix}${index} .cpp)
193
193
endif ()
194
-
194
+
195
195
# Headers that should run through moc
196
196
if (EXISTS ${CMAKE_CURRENT_SOURCE_DIR} /${file_prefix}${index} .h)
197
197
list (APPEND moc_sources ${file_prefix}${index} .h)
198
198
endif ()
199
-
199
+
200
200
endforeach ()
201
-
201
+
202
202
list (APPEND sources ${file_prefix} _init.cpp)
203
203
204
204
endif ()
@@ -224,7 +224,7 @@ qt4_add_resources(gen_qrc_sources ${qrc_sources})
224
224
include_directories (
225
225
${CMAKE_CURRENT_SOURCE_DIR} /src
226
226
)
227
-
227
+
228
228
add_library (PythonQt SHARED
229
229
${sources}
230
230
${gen_moc_sources}
@@ -276,10 +276,10 @@ if(BUILD_TESTING)
276
276
)
277
277
278
278
set_property (SOURCE tests/PythonQtTestMain.cpp PROPERTY COMPILE_DEFINITIONS "main=tests_PythonQtTestMain" )
279
-
279
+
280
280
add_executable (PythonQtCppTests ${test_sources} )
281
281
target_link_libraries (PythonQtCppTests PythonQt)
282
-
282
+
283
283
add_test (
284
284
NAME tests_PythonQtTestMain
285
285
COMMAND ${Slicer_LAUNCH_COMMAND} $<TARGET_FILE:PythonQtCppTests> tests/PythonQtTestMain
0 commit comments