[CMake] dlopen()able library making
Craig Bradney
cbradney at zip.com.au
Wed Apr 5 08:54:57 EDT 2006
On Wednesday 05 April 2006 13:36, William A. Hoffman wrote:
> At 02:35 AM 4/5/2006, Craig Bradney wrote:
> >SET(SCRIBUS_COLORWHEEL_PLUGIN "colorwheel")
> >IF(QT_WRAP_CPP)
> > SCRIBUS_QT_WRAP_CPP(${SCRIBUS_COLORWHEEL_PLUGIN}
> >${COLORWHEEL_PLUGIN_MOC_CLASSES})
> >ENDIF(QT_WRAP_CPP)
> >
> >ADD_LIBRARY(${SCRIBUS_COLORWHEEL_PLUGIN} MODULE
> > ${COLORWHEEL_PLUGIN_SOURCES} ${COLORWHEEL_PLUGIN_MOC_SOURCES})
> >
> >
> >So theres not much different.. apart from the moc setup which all seems to
> >work fine (as it does in the main code). Perhaps the only surprise there
> > is the SCRIBUS_QT_WRAP which gives me class.moc instead of moc_class.cxx
> > files. This is the first plugin I've attempted to get working from all
> > you will see in the plugins directory (aside from some STATIC ones not in
> > this directory which work fine).
>
> What does the macro SCRIBUS_QT_WRAP_CPP do? Maybe it is clobbering the
> value in COLORWHEEL_PLUGIN_SOURCES somehow. If you do a make VERBOSE=1,
> does it compile all the files that it should? Like colorwheel.cpp? You
> could post the build.make from here CMakeFiles/colorwheel.dir/build.make.
>
SCRIBUS_QT_WRAP_CPP is based on the QT4_WRAP_CPP:
MACRO(SCRIBUS_QT_WRAP_CPP outfiles )
FOREACH(it ${ARGN})
GET_FILENAME_COMPONENT(outfile ${it} NAME_WE)
SET(infile ${CMAKE_CURRENT_SOURCE_DIR}/${it})
SET(outfile ${CMAKE_CURRENT_BINARY_DIR}/${outfile}.moc)
ADD_CUSTOM_COMMAND(OUTPUT ${outfile}
COMMAND ${QT_MOC_EXECUTABLE}
ARGS -o ${outfile} ${infile}
MAIN_DEPENDENCY ${infile})
SET(${outfiles} ${${outfiles}} ${outfile})
ENDFOREACH(it)
ENDMACRO(SCRIBUS_QT_WRAP_CPP)
Simply so we can use filename.moc to include them in the original .cpp files
without changing any source code. All files are run through moc and built ok.
Perhaps this is the problem.. it wouldn't surprise me given I just hacked up
the original, especially if Qt4 works significantly differently to Qt3 WRT
plugins (although, apart from the symbols not being dynamic like in this
plugin, the main exe runs quite fine with all of its moc'd cpp files using
the same method).
build.make is attached.
thanks
Craig
-------------- next part --------------
# CMAKE generated file: DO NOT EDIT!
# Generated by "Unix Makefiles" Generator, CMake Version 2.3
#=============================================================================
# Special targets provided by cmake.
# Suppress display of executed commands.
$(VERBOSE).SILENT:
# Disable implicit rules so canoncical targets will work.
.SUFFIXES:
.SUFFIXES: .hpux_make_needs_suffix_list
#=============================================================================
# Set environment variables for the build.
# The shell in which to execute make rules.
SHELL = /bin/sh
# The CMake executable.
CMAKE_COMMAND = /home/craig/installs/cmake/bin/cmake
# The command to remove a file.
RM = /home/craig/installs/cmake/bin/cmake -E remove -f
# The program to use to edit the cache.
CMAKE_EDIT_COMMAND = /home/craig/installs/cmake/bin/ccmake
# The top-level source directory on which CMake was run.
CMAKE_SOURCE_DIR = /home/craig/proj2/scribus/cmake/Scribus
# The top-level build directory on which CMake was run.
CMAKE_BINARY_DIR = /home/craig/proj2/scribus/cmake/Scribus
scribus/plugins/colorwheel/colorblind.moc: scribus/plugins/colorwheel/colorblind.h
@echo "Generating colorblind.moc"
cd /home/craig/proj2/scribus/cmake/Scribus/scribus/plugins/colorwheel && /usr/qt/3/bin/moc -o /home/craig/proj2/scribus/cmake/Scribus/scribus/plugins/colorwheel/colorblind.moc /home/craig/proj2/scribus/cmake/Scribus/scribus/plugins/colorwheel/colorblind.h
scribus/plugins/colorwheel/colorwheel.moc: scribus/plugins/colorwheel/colorwheel.h
@echo "Generating colorwheel.moc"
cd /home/craig/proj2/scribus/cmake/Scribus/scribus/plugins/colorwheel && /usr/qt/3/bin/moc -o /home/craig/proj2/scribus/cmake/Scribus/scribus/plugins/colorwheel/colorwheel.moc /home/craig/proj2/scribus/cmake/Scribus/scribus/plugins/colorwheel/colorwheel.h
scribus/plugins/colorwheel/colorwheelwidget.moc: scribus/plugins/colorwheel/colorwheelwidget.h
@echo "Generating colorwheelwidget.moc"
cd /home/craig/proj2/scribus/cmake/Scribus/scribus/plugins/colorwheel && /usr/qt/3/bin/moc -o /home/craig/proj2/scribus/cmake/Scribus/scribus/plugins/colorwheel/colorwheelwidget.moc /home/craig/proj2/scribus/cmake/Scribus/scribus/plugins/colorwheel/colorwheelwidget.h
scribus/plugins/colorwheel/cwdialog.moc: scribus/plugins/colorwheel/cwdialog.h
@echo "Generating cwdialog.moc"
cd /home/craig/proj2/scribus/cmake/Scribus/scribus/plugins/colorwheel && /usr/qt/3/bin/moc -o /home/craig/proj2/scribus/cmake/Scribus/scribus/plugins/colorwheel/cwdialog.moc /home/craig/proj2/scribus/cmake/Scribus/scribus/plugins/colorwheel/cwdialog.h
scribus/plugins/colorwheel/cwsetcolor.moc: scribus/plugins/colorwheel/cwsetcolor.h
@echo "Generating cwsetcolor.moc"
cd /home/craig/proj2/scribus/cmake/Scribus/scribus/plugins/colorwheel && /usr/qt/3/bin/moc -o /home/craig/proj2/scribus/cmake/Scribus/scribus/plugins/colorwheel/cwsetcolor.moc /home/craig/proj2/scribus/cmake/Scribus/scribus/plugins/colorwheel/cwsetcolor.h
# Include any dependencies generated for this target.
include scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/depend.make
# Include the compile flags for this target's objects.
include scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/flags.make
scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/depend.make.mark: scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/flags.make
scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/depend.make.mark: scribus/plugins/colorwheel/colorblind.cpp
scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/colorblind.o: scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/flags.make
scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/colorblind.o: scribus/plugins/colorwheel/colorblind.cpp
@echo "Building CXX object scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/colorblind.o"
/usr/bin/c++ $(CXX_FLAGS) -o scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/colorblind.o -c /home/craig/proj2/scribus/cmake/Scribus/scribus/plugins/colorwheel/colorblind.cpp
scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/colorblind.o.requires:
scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/colorblind.o.provides: scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/colorblind.o.requires
$(MAKE) -f scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/build.make scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/colorblind.o.provides.build
scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/colorblind.o.provides.build: scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/colorblind.o
scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/depend.make.mark: scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/flags.make
scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/depend.make.mark: scribus/plugins/colorwheel/colorwheel.cpp
scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/colorwheel.o: scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/flags.make
scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/colorwheel.o: scribus/plugins/colorwheel/colorwheel.cpp
@echo "Building CXX object scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/colorwheel.o"
/usr/bin/c++ $(CXX_FLAGS) -o scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/colorwheel.o -c /home/craig/proj2/scribus/cmake/Scribus/scribus/plugins/colorwheel/colorwheel.cpp
scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/colorwheel.o.requires:
scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/colorwheel.o.provides: scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/colorwheel.o.requires
$(MAKE) -f scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/build.make scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/colorwheel.o.provides.build
scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/colorwheel.o.provides.build: scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/colorwheel.o
scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/depend.make.mark: scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/flags.make
scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/depend.make.mark: scribus/plugins/colorwheel/colorwheelwidget.cpp
scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/colorwheelwidget.o: scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/flags.make
scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/colorwheelwidget.o: scribus/plugins/colorwheel/colorwheelwidget.cpp
@echo "Building CXX object scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/colorwheelwidget.o"
/usr/bin/c++ $(CXX_FLAGS) -o scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/colorwheelwidget.o -c /home/craig/proj2/scribus/cmake/Scribus/scribus/plugins/colorwheel/colorwheelwidget.cpp
scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/colorwheelwidget.o.requires:
scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/colorwheelwidget.o.provides: scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/colorwheelwidget.o.requires
$(MAKE) -f scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/build.make scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/colorwheelwidget.o.provides.build
scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/colorwheelwidget.o.provides.build: scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/colorwheelwidget.o
scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/depend.make.mark: scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/flags.make
scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/depend.make.mark: scribus/plugins/colorwheel/cwdialog.cpp
scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/cwdialog.o: scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/flags.make
scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/cwdialog.o: scribus/plugins/colorwheel/cwdialog.cpp
@echo "Building CXX object scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/cwdialog.o"
/usr/bin/c++ $(CXX_FLAGS) -o scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/cwdialog.o -c /home/craig/proj2/scribus/cmake/Scribus/scribus/plugins/colorwheel/cwdialog.cpp
scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/cwdialog.o.requires:
scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/cwdialog.o.provides: scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/cwdialog.o.requires
$(MAKE) -f scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/build.make scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/cwdialog.o.provides.build
scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/cwdialog.o.provides.build: scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/cwdialog.o
scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/depend.make.mark: scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/flags.make
scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/depend.make.mark: scribus/plugins/colorwheel/cwsetcolor.cpp
scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/cwsetcolor.o: scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/flags.make
scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/cwsetcolor.o: scribus/plugins/colorwheel/cwsetcolor.cpp
@echo "Building CXX object scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/cwsetcolor.o"
/usr/bin/c++ $(CXX_FLAGS) -o scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/cwsetcolor.o -c /home/craig/proj2/scribus/cmake/Scribus/scribus/plugins/colorwheel/cwsetcolor.cpp
scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/cwsetcolor.o.requires:
scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/cwsetcolor.o.provides: scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/cwsetcolor.o.requires
$(MAKE) -f scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/build.make scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/cwsetcolor.o.provides.build
scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/cwsetcolor.o.provides.build: scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/cwsetcolor.o
scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/depend: scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/depend.make.mark
scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/depend.make.mark:
@echo "Scanning dependencies of target colorwheel"
$(CMAKE_COMMAND) -E cmake_depends "Unix Makefiles" /home/craig/proj2/scribus/cmake/Scribus /home/craig/proj2/scribus/cmake/Scribus/scribus/plugins/colorwheel /home/craig/proj2/scribus/cmake/Scribus/scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/DependInfo.cmake
# Object files for target colorwheel
colorwheel_OBJECTS = \
"CMakeFiles/colorwheel.dir/colorblind.o" \
"CMakeFiles/colorwheel.dir/colorwheel.o" \
"CMakeFiles/colorwheel.dir/colorwheelwidget.o" \
"CMakeFiles/colorwheel.dir/cwdialog.o" \
"CMakeFiles/colorwheel.dir/cwsetcolor.o"
# External object files for target colorwheel
colorwheel_EXTERNAL_OBJECTS =
scribus/plugins/colorwheel/libcolorwheel.so: scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/colorblind.o
scribus/plugins/colorwheel/libcolorwheel.so: scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/colorwheel.o
scribus/plugins/colorwheel/libcolorwheel.so: scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/colorwheelwidget.o
scribus/plugins/colorwheel/libcolorwheel.so: scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/cwdialog.o
scribus/plugins/colorwheel/libcolorwheel.so: scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/cwsetcolor.o
scribus/plugins/colorwheel/libcolorwheel.so: scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/build.make
@echo "Linking CXX shared module libcolorwheel.so"
cd /home/craig/proj2/scribus/cmake/Scribus/scribus/plugins/colorwheel && $(CMAKE_COMMAND) -P CMakeFiles/colorwheel.dir/cmake_clean_target.cmake
cd /home/craig/proj2/scribus/cmake/Scribus/scribus/plugins/colorwheel && /usr/bin/c++ -fPIC -O0 -g3 -shared -Wl,-soname,libcolorwheel.so -o libcolorwheel.so $(colorwheel_OBJECTS) $(colorwheel_EXTERNAL_OBJECTS) -L/lib -L/usr/X11R6/lib -L/usr/qt/3/lib -lqt-mt -lcups -lfreetype -lfontconfig -llcms -lart_lgpl_2 -lxml2 -lpython2.4 -ltiff -lz -Wl,-rpath,/lib:/usr/X11R6/lib:/usr/qt/3/lib
# Convenience name for target.
scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/build: scribus/plugins/colorwheel/libcolorwheel.so
scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/requires: scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/colorblind.o.requires
scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/requires: scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/colorwheel.o.requires
scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/requires: scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/colorwheelwidget.o.requires
scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/requires: scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/cwdialog.o.requires
scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/requires: scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/cwsetcolor.o.requires
scribus/plugins/colorwheel/CMakeFiles/colorwheel.dir/clean:
cd /home/craig/proj2/scribus/cmake/Scribus/scribus/plugins/colorwheel && $(CMAKE_COMMAND) -P CMakeFiles/colorwheel.dir/cmake_clean.cmake
More information about the CMake
mailing list