[CMake] Converting a qmake project to cmake
Mike Jackson
imikejackson at gmail.com
Wed Dec 5 11:40:08 EST 2007
Take a look at:
<http://titanium.imts.us/viewvc/Task_7/MXATools/src/DataViewer/
CMakeLists.txt?view=markup>
Specifically, look for this section:
# another list, this time it includes all header files that should
# be treated with moc
SET( QMXAVIEWER_MOC_HDRS
${MXAViewer_SOURCE_DIR}/QMXADataViewer.h
${MXATools_PROJECT_DIR}/src/Shared/QDataRecordModel.h
${MXATools_PROJECT_DIR}/src/Shared/SpinBoxDelegate.h
${MXATools_PROJECT_DIR}/src/Shared/HDFGraphicsDelegate.h
${MXATools_PROJECT_DIR}/src/Shared/QHDF5TableModel.h
${MXATools_PROJECT_DIR}/src/Shared/IQHDF5Dataset.h
${MXATools_PROJECT_DIR}/src/Shared/IQPixmapGenerator.h
)
and a bit later down the file:
# and finally this will run moc:
QT4_WRAP_CPP( QMXAVIEWER_MOC_SRCS ${QMXAVIEWER_MOC_HDRS} )
--
Mike Jackson Senior Research Engineer
Innovative Management & Technology Services
On Dec 5, 2007, at 10:57 AM, Leopold Palomo-Avellaneda wrote:
> Hi,
>
> I'm trying to convert a qmake project to cmake. I have tested
> several tools,
> but, I have realised that by hand is more or less the best way.
>
> I edit the .pro file to obtain the files and create the cmake.
> However there's
> a think that is problematic is that I have a list in the HEADERS
> part of the
> pro file with all the *.h files, but no _all_ must moc. The
> questions is , as
> I must indicate to the cmake which one to moc, exists a way to tell to
> cmake "automagically" from a list of headers which one must moc or
> not?
>
> Regards,
>
> Leo
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake
More information about the CMake
mailing list