Hi, I have a project where Qt is used, so I use AUTOMOC. However I have something special: My Qt class implementation needs another (external) Qt implemented source, which I have packed as tar.bz2 file.
I have a rule which shall extract the .tar.bz2 file, which works nicely. However, the AUTOMOC generates the moc_ file BEFORE the rule to extract the .tar.bz2 file triggers, which means moc can not include some headers which are inside this tar file and the result is wrong. I have something like (excerpt): add_library(MYLIB MODULE source.cxx) set_target_properties(MYLIB PROPERTIES AUTOMOC TRUE) add_custom_command(OUTPUT header.h COMMAND ${CMAKE_COMMAND} -E tar xf ${CMAKE_CURRENT_SOURCE_DIR}/includes.tar.bz2 COMMAND ${CMAKE_COMMAND} -E tar vxf ${CMAKE_CURRENT_SOURCE_DIR}/${TARFILE} COMMAND ${CMAKE_COMMAND} -E touch_nocreate header.h DEPENDS ${TARFILE}) add_custom_target(data_lib DEPENDS header.h) add_dependencies(${TARGET} data_lib) What rules can I add so that the tar extraction is done BEFORE the moc generation ? -- Best Regards/Schöne Grüße Martin -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake