[Kde-bindings] KDE/kdebindings/php/phpqt/src
Thomas Moenicke
tm at php-qt.org
Sun Jul 13 15:29:04 UTC 2008
SVN commit 831890 by moenicke:
* fixed undefined references when linking against php with the kde build system
CCMAIL: kde-bindings at kde.org
M +16 -5 CMakeLists.txt
--- trunk/KDE/kdebindings/php/phpqt/src/CMakeLists.txt #831889:831890
@@ -1,3 +1,4 @@
+PROJECT(PHP-Qt)
OPTION(PHPQT_MOC_DEBUG "debug moc" OFF)
OPTION(PHPQT_DEBUG "" OFF)
@@ -57,6 +58,7 @@
add_library(php_qt MODULE ${phpqt_LIB_SRCS})
target_link_libraries(php_qt
+ smokeqt
${QT_QTCORE_LIBRARY}
${QT_QTSVG_LIBRARY}
${QT_QTGUI_LIBRARY}
@@ -68,12 +70,21 @@
${QTDBUS_LIBRARY}
${QSCINTILLA_LIBRARIES}
${QWT_LIBRARIES}
- smokeqt
)
-set_target_properties(php_qt PROPERTIES PREFIX "")
-IF(APPLE)
- set_target_properties(php_qt PROPERTIES PREFIX "" LINK_FLAGS ${CMAKE_SHARED_MODULE_CREATE_C_FLAGS} SUFFIX ".so")
-ENDIF(APPLE)
+if(${CMAKE_MODULE_LINKER_FLAGS} MATCHES "no-undefined")
+ string(REPLACE "-Wl,--no-undefined" " " CMAKE_MODULE_LINKER_FLAGS ${CMAKE_MODULE_LINKER_FLAGS})
+ set_target_properties(php_qt PROPERTIES PREFIX "")
+ IF(APPLE)
+ set_target_properties(php_qt PROPERTIES PREFIX "" LINK_FLAGS ${CMAKE_SHARED_MODULE_CREATE_C_FLAGS} SUFFIX ".so")
+ ENDIF(APPLE)
+ set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined")
+else(${CMAKE_MODULE_LINKER_FLAGS} MATCHES "no-undefined")
+ set_target_properties(php_qt PROPERTIES PREFIX "")
+ IF(APPLE)
+ set_target_properties(php_qt PROPERTIES PREFIX "" LINK_FLAGS ${CMAKE_SHARED_MODULE_CREATE_C_FLAGS} SUFFIX ".so")
+ ENDIF(APPLE)
+endif(${CMAKE_MODULE_LINKER_FLAGS} MATCHES "no-undefined")
+
install(TARGETS php_qt DESTINATION ${PHP5_EXTENSION_DIR}/ )
More information about the Kde-bindings
mailing list