Hi, I made some experiment with this issue and I tried two ideas out:
1) I made a cmake_test project folder with two subfolders: foo and bar. From the main CMakeLists.txt: add_subdirectory(foo) add_subdirectory(bar) Then: cat ../foo/CMakeLists.txt find_package(Qt4) if(QT_QTDECLARATIVE_FOUND) message("found it") endif() cat ../bar/CMakeLists.txt find_package(Qt4) if(QT_QTDECLARATIVE_FOUND) message("found it again") endif() The result was that I got both messages. It might well mean that something is messed in my project build environment, but this is something which I would like to ask for help with from you. 2) If I try to find the Qt4 package twice the FOUND variable is set properly. It might help with troubleshooting the issue, but I do not know the internal cmake operation. find_package(Qt4) find_package(Qt4) message(STATUS "QT_QTDECLARATIVE_FOUND: ${QT_QTDECLARATIVE_FOUND}") if(QT_QTDECLARATIVE_FOUND) add_subdirectory(touch) else(QT_QTDECLARATIVE_FOUND) message(WARNING "Qt installation lacks Qt Declarative - disabling touch based player") endif(QT_QTDECLARATIVE_FOUND) Best Regards, Laszlo Papp _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake