From kde-buildsystem Thu Mar 12 20:12:26 2009 From: Alexander Neundorf Date: Thu, 12 Mar 2009 20:12:26 +0000 To: kde-buildsystem Subject: Re: using check_cxx_source_runs Message-Id: <200903122112.26582.neundorf () kde ! org> X-MARC-Message: https://marc.info/?l=kde-buildsystem&m=123688882717717 On Thursday 12 March 2009, Leo Franchi wrote: > On 12 Mar 2009, at 19:49, Alexander Neundorf wrote: ... > > Can you please post a minimal example ? > > So I can just try and see what goes wrong ? > > Yep, so the source that we are trying to compile is this: > * > * Copyright (C) 2009 Ian Monroe > * released under public domain or: > (snipped) > */ > > #include > #include > #include > #include > #include > > #define FAIL 0xA > > int main(int argc, char **argv) > { > KAboutData about( "findgeneratorplugins", "", ki18n("Generator > Exists?"), "1.0", ki18n("Find if the QtScript Plugins Are Installed"), > KAboutData::License_LGPL_V2 ); > KCmdLineArgs::init( argc, argv, &about ); > KApplication app; > > QStringList allowedBindings; > allowedBindings << "qt.core" << "qt.gui" << "qt.sql" << "qt.xml" > << "qt.uitools" << "qt.network"; > QScriptEngine engine; > foreach( QString binding, allowedBindings ) > { > if( !engine.importExtension( binding ).isUndefined() ) > { // undefined indiciates success > qDebug( binding.toLatin1() + " not found" ); > return FAIL; > } > } > return 0; > } > > > and the cmake stuff is this: > > include(CheckCXXSourceRuns) > > file( READ "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules/ > QtScriptBindingsTest.cpp" source ) > message(STATUS "Checking if the QtScript Qt Bindings are installed.") > > #set( BINDINGS_RUN_RESULT -10 ) > set(CMAKE_REQUIRED_DEFINTIONS ${QT_DEFINITIONS} ${KDE4_DEFINITIONS} ) > set(CMAKE_REQUIRED_INCLUDES ${QT_QTCORE_INCLUDE_DIR} $ > {QT_QTSCRIPT_INCLUDE_DIR} ${KDE4_INCLUDES}) > set(CMAKE_REQUIRED_LIBRARIES QtScript kdeui) I guess you tried ${QT_QTSCRIPT_LIBRARY} and ${KDE4_KDEUI_LIBS} ? Alex _______________________________________________ Kde-buildsystem mailing list Kde-buildsystem@kde.org https://mail.kde.org/mailman/listinfo/kde-buildsystem