[CMake] QT_QTDECLARATIVE_FOUND issue on N9(50)
Laszlo Papp
lpapp at kde.org
Sun Jul 10 07:46:13 EDT 2011
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
More information about the CMake
mailing list