[Kde-bindings] new generator: mac os x building
Petr Vanek
petr at scribus.info
Tue Oct 13 10:00:50 UTC 2009
hi again,
I tried to build smoke with "generator" on mac. I had to do some
changes in the cmake stuff to get it working.
content:
1) generator executable split
2) qt functions filter for mac
1) mac cannot link executables as libraries as it's possible (?) on
linux. So I had to change it a bit. The generator is split into
generator_lib shared library (all src except main.cpp) and generator
executable (main.cpp) linked with generator_lib.
Linking of "plugins" is changed too.
It's tested on Linux (suse), and macosx leopard.
--- generator/generators/dump/CMakeLists.txt (revision 2786)
+++ generator/generators/dump/CMakeLists.txt (working copy)
@@ -4,5 +4,5 @@
generator_dump.cpp)
add_library(generator_dump SHARED ${generator_dump_SRC})
-target_link_libraries(generator_dump ${QT_QTCORE_LIBRARY} generator)
+target_link_libraries(generator_dump ${QT_QTCORE_LIBRARY}
generator_lib)
set_target_properties(generator_dump PROPERTIES PREFIX "")
Index: generator/generators/smoke/CMakeLists.txt
===================================================================
--- generator/generators/smoke/CMakeLists.txt (revision 2786)
+++ generator/generators/smoke/CMakeLists.txt (working copy)
@@ -7,5 +7,5 @@
helpers.cpp)
add_library(generator_smoke SHARED ${generator_smoke_SRC})
-target_link_libraries(generator_smoke ${QT_QTCORE_LIBRARY} $
{QT_QTXML_LIBRARY} generator)
+target_link_libraries(generator_smoke ${QT_QTCORE_LIBRARY} $
{QT_QTXML_LIBRARY} generator_lib)
#set_target_properties(generator_smoke PROPERTIES PREFIX "")
Index: generator/CMakeLists.txt
===================================================================
--- generator/CMakeLists.txt (revision 2786)
+++ generator/CMakeLists.txt (working copy)
@@ -11,6 +11,9 @@
set(generator_SRC
main.cpp
+)
+
+set(generator_lib_SRC
generatorenvironment.cpp
generatorvisitor.cpp
generatorpreprocessor.cpp
@@ -20,8 +23,12 @@
type.cpp
)
+add_library(generator_lib SHARED ${generator_lib_SRC})
+target_link_libraries(generator_lib ${QT_QTCORE_LIBRARY} $
{QT_QTXML_LIBRARY} cppparser)
+
+
add_executable(generator ${generator_SRC})
-target_link_libraries(generator ${QT_QTCORE_LIBRARY} $
{QT_QTXML_LIBRARY} cppparser)
+target_link_libraries(generator ${QT_QTCORE_LIBRARY} $
{QT_QTXML_LIBRARY} cppparser generator_lib)
set_target_properties(generator PROPERTIES COMPILE_DEFINITIONS
__GENERATOR_BUILDING ENABLE_EXPORTS TRUE)
add_subdirectory(generators)
2) there should be new "reject" filter in Qt's smokeconfig.xml to
prevent linking failures.
Index: smoke/qt/smokeconfig.xml
===================================================================
--- smoke/qt/smokeconfig.xml (revision 2786)
+++ smoke/qt/smokeconfig.xml (working copy)
@@ -25,6 +25,8 @@
<signature>.*qFindString.*</signature>
<!-- windows internal helper functions -->
<signature>.*qFrom.*Endian_helper.*</signature>
+ <!-- mac os x special functions -->
+ <signature>.*qt_mac_set_cursor.*</signature>
</exclude>
<functions>
<!-- include functions starting with 'q' -->
petr
More information about the Kde-bindings
mailing list