cmake-conan icon indicating copy to clipboard operation
cmake-conan copied to clipboard

conan_cmake_run with OPTIONS

Open ShamanTcler opened this issue 4 years ago • 0 comments

Conan version: 1.26.0 Conan Cmake :0.15.0

Trying to build a library called qwt which needs qt. Qt has a LOT of options many do not affect the library.

I am having multiple issues.

This is what I am trying:

conan_cmake_run(
		REQUIRES
                    qt/5.12.8@bincrafters/stable
                OPTIONS
                    Qt5:qtsvg=TRUE
                    Qt5:qtcharts=ANY
                    Qt5:qtdeclarative=ANY
                    Qt5:qtqscript=ANY
                    Qt5:qtwebengine=ANY
                    Qt5:qtwinextras=ANY
                IMPORTS
		    ${CONANIMPORTS}
                BASIC_SETUP
                   CMAKE_TARGETS
                )

Now the values for say are T/F ... but I have seen ANY used before. Is this a viable option for things we just don't care about?

Assuming it is not viable I tried

conan_cmake_run(
		REQUIRES
                    qt/5.12.8@bincrafters/stable
                OPTIONS
                    Qt5:qtsvg=TRUE
                    Qt5:qtcharts=TRUE
                    Qt5:qtdeclarative=TRUE
                    Qt5:qtqscript=TRUE
                    Qt5:qtwebengine=TRUE
                    Qt5:qtwinextras=TRUE
                IMPORTS
		    ${CONANIMPORTS}
                BASIC_SETUP
                   CMAKE_TARGETS
                )

And Conan says it can find a library to satisfy my needs .... The first two bold is it setting qtcharts and qtsvg to FALSE when I set it to TRUE in the call above. Then it tosses in some caches status in the middle of the options value list.


  • Settings: arch=x86_64, build_type=Release, compiler=Visual Studio, compiler.runtime=MD, compiler.version=14, os=Windows
  • Options: GUI=True, commercial=False, config=None, cross_compile=None, device=None, multiconfiguration=False, opengl=desktop, openssl=True, qt3d=False, qtactiveqt=False, qtandroidextras=False, qtcanvas3d=False, qtcharts=False, qtconnectivity=False, qtdatavis3d=False, qtdeclarative=False, qtdoc=False, qtgamepad=False, qtgraphicaleffects=False, qtimageformats=False, qtlocation=False, qtmacextras=False, qtmultimedia=False, qtnetworkauth=False, qtpurchasing=False, qtqa=False, qtquickcontrols=False, qtquickcontrols2=False, qtremoteobjects=False, qtrepotools=False, qtscript=False, qtscxml=False, qtsensors=False, qtserialbus=False, qtserialport=False, qtspeech=False, qtsvg=False, qttools=False, qttranslations=False, qtvirtualkeyboard=False, qtwayland=Fale_ _libpng/1.6.37:ee5dab950b6ea94ae953b93c55343e98c2ec39df - Cache libpq/11.5:29fcdf97a05af679d707cddf6fad5c3393dea6c6 - Cache openssl/1.1.1f:63da998e3642b50bee33f4449826b2d623661505 - Cache pcre/8.41:338b5858bc652693e9870677b370ca2c38b8d56d - Cache pcre2/10.33:fcb9bddca34545f89b66b8c9ee030b58a9f4d006 - Cache qt/5.12.8@bincrafters/stable:4d38879beccbd4ed2f6ffdeed1b21c084d44d917 - Missing sqlite3/3.29.0:f633d044ca5bd9bf6e591d586da5ceebff661a83 - Cache zlib/1.2.11:63da998e3642b50bee33f4449826b2d623661505 - Cache

Installing (downloading, building) binaries...

se, qtwebchannel=False, qtwebengine=False, qtwebglplugin=False, qtwebsockets=False, qtwebview=False, qtwinextras=False, qtx11extras=False, qtxmlpatterns=False, shared=True, sysroot=None, widgets=True, with_doubleconversion=True, with_fontconfig=False, with_freetype=True, with_glib=False, with_harfbuzz=True, with_icu=False, with_libalsa=False, with_libjpeg=True, with_libpng=True, with_mysql=False, with_odbc=True, with_openal=False, with_pcre2=True, with_pq=True, with_sdl2=False, with_sqlite3=True, bzip2:build_executable=True, bzip2:shared=False, double-conversion:shared=False, freetype:shared=False, freetype:with_bzip2=True, freetype:with_png=True, freetype:with_zlib=True, glib:shared=True, glib:with_elf=True, glib:with_pcre=True, harfbuzz:shared=False, harfbuzz:with_freetype=True, harfbuzz:with_gdi=True, harfbuzz:with_glib=True, harfbuzz:with_icu=False, harfbuzz:with_uniscribe=True, libelf:shared=False, libffi:shared=False, libgettext:shared=False, libiconv:shared=False, libjpeg:shared=False, libpng:api_prefix=None, libpng:shared=False, libpq:shared=False, libpq:with_openssl=False, libpq:with_zlib=True, openssl:386=False, openssl:capieng_dialog=False, openssl:no_asm=False, openssl:no_async=False, openssl:no_bf=False, openssl:no_cast=False, openssl:no_des=False, openssl:no_dh=False, openssl:no_dsa=False, openssl:no_dso=False, openssl:no_hmac=False, openssl:no_md5=False, openssl:no_mdc2=False, openssl:no_rc2=False, openssl:no_rsa=False, openssl:no_sha=False, openssl:no_sse2=False, openssl:no_threads=False, openssl:openssldir=None, openssl:shared=False, pcre:build_pcrecpp=False, pcre:build_pcregrep=False, pcre:shared=False, pcre:with_bzip2=True, pcre:with_jit=False, pcre:with_unicode_properties=False, pcre:with_utf=False, pcre:with_zlib=True, pcre2:build_pcre2_16=True, pcre2:build_pcre2_32=True, pcre2:build_pcre2_8=True, pcre2:shared=False, pcre2:support_jit=True, pcre2:with_bzip2=True, sqlite3:build_executable=True, sqlite3:disable_gethostuuid=False, sqlite3:enable_column_metadata=True, sqlite3:enable_explain_comments=False, sqlite3:enable_fts3=False, sqlite3:enable_fts4=False, sqlite3:enable_fts5=False, sqlite3:enable_json1=False, sqlite3:enable_rtree=True, sqlite3:enable_unlock_notify=True, sqlite3:omit_load_extension=False, sqlite3:shared=False, sqlite3:threadsafe=1, zlib:minizip=False, zlib:shared=False


As you can see working with a large number of options is quite tedious.

A few issues I have come across:

  • Finding the namespace of Qt5 vs Qt
  • Qt5:qtsvg vs Qt5::qtsvg
  • the best way to examine option lists is put "have" and "want" values in sorted list and diff them

To summarize:

  • Would like the ANY value on options that make no difference ... is that possible
  • Why when the values are set are they ignored

ShamanTcler avatar Jun 16 '20 12:06 ShamanTcler