Re: [CMake] List all packages
Hey, As far as I know there is no such mechanism. But you can write a little script f.e. in python (or cmake itself) which can do that, because it is just a simple file search. Greetings Tonka Am So., 13. Jän. 2019, 09:43 hat Lectem geschrieben: > > > Hi, > > > > Is there a way to list all the packages (both config files and > find-modules) that find_package could find ? > > Could we even imagine this would also permit to list the variables and > targets created in it ? > > I think that would be a very helpful to have for debugging find_package, > especially when you don’t have access to the system having issues (user bug > reports for example). > > > Cheers, > > Lectem > -- > > 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: > https://cmake.org/mailman/listinfo/cmake > -- 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: https://cmake.org/mailman/listinfo/cmake
[CMake] cmake install script
Hey@everybody, I have a little problem with the cmake installer script on Ubuntu. I need the latest cmake,so that's the only way. The script works fine but now I want to automate the cmake install on my ci server, but the license accept prompt block me. The default answer is no, so the script abort. Does anybody know how I can automatically accept the license? Greetings Tonka -- 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
[CMake] CPack WIX - disable feature by default
Hello, I’ve create an installer with cpack and WIX (cpack –G WIX). Everything works fine, but I have one big problem. I have 2 features, which are created by cpack(wix). My Problem: I want to deactivate the CM_C_dev feature by default (CPACK_WIX seems to ignore my set(CPACK_COMPONENT_DEV_DISABLED ON) ). The user should be able to activate it if he/she wants that. I know how I can do it with WIX itself (handmade), but I have big troubles to inject that into the cpack_wix flow. I have to add Level=”2” to the Feature with the Id=”CM_C_DEV” like or add a property (as value) like DISABLE_FEATUREA I’ve tried the CPACK_WIX_PATCH function, but I’m only able to add something to the ProductRoot feature (ID=”ProductFeature”) via But not into the subfeature CM_C_dev Does anybody know how I can do that (or maybe another way)? -- 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
Re: [CMake] best practice for bundling 3rdparty dependencies in, windows
Thanks for your answer. I've see that most of your code is very similar to my code, the only difference is that you use file(copy ... To be able to copy the file to the install directory, I use install(FILES ... But what is fixup_bundle good for? Am 20.02.2017 17:26 schrieb "Lee Butler": > Since I have wrestled with this on a recurring basis let me offer the > following. We package Qt. OpenSceneGraph and other libraries as 3rdParty > content to the application we build/deploy. Because the 3rd party libraries > have their own plugins and dependencies, we end up doing a number of things: > > 1) install(TARGETS ...) to get the things we build installed > 2) install(CODE ...) to get a lot of dependencies installed. > > The thing to keep in mind is that CPACK essentially does an install to a > directory other than the CMAKE_INSTALL_PREFIX to create the file system > structure that it will package. It seems to do this by setting > CMAKE_INSTALL_PREFIX to something it wants. This is slick but if you are > doing things by hand you have to realize that it isn't the location you set > when you run CMAKE. > > Some of the key code looks like this:set(EXEC_NAME "vsl-bin") > > >1. set(EXEC_NAME "vsl-bin") >2. add_executable(${EXEC_NAME} ${product_SRCS} ${UIS} ${RCS} ) >3. target_link_libraries(${EXEC_NAME} ${product_LIBS}) >4. install(TARGETS ${EXEC_NAME} >5. BUNDLE DESTINATION . COMPONENT Runtime >6. RUNTIME DESTINATION bin COMPONENT Runtime ) >7. INSTALL(CODE "file(GLOB_RECURSE VSLPLUGINS >\"\${CMAKE_INSTALL_PREFIX}/bin/*${CMAKE_SHARED_LIBRARY_SUFFIX}\") >8. FILE(COPY \"${OSG_INCLUDE_DIR}/../bin/osgPlugins-3.4.0\" >DESTINATION \"\${CMAKE_INSTALL_PREFIX}/bin\") >9. FILE(GLOB OSGLIBS \"${OSG_INCLUDE_DIR}/../bin/*$ >{CMAKE_SHARED_LIBRARY_SUFFIX}\") >10. FILE(COPY \${OSGLIBS} DESTINATION \"\${CMAKE_INSTALL_PREFIX}/ >bin\") >11. FILE(GLOB QTPLUGINS \"${Qt5_DIR}/../../../plugins/*\") >12. FILE(COPY \${QTPLUGINS} DESTINATION >\"\${CMAKE_INSTALL_PREFIX}/bin\") >13. include(BundleUtilities) >14. fixup_bundle(\"\${CMAKE_INSTALL_PREFIX}/bin/${EXEC_ >NAME}${CMAKE_EXECUTABLE_SUFFIX}\" \"\${VSLPLUGINS}\" \"${DIRS}\") >15. " COMPONENT Runtime) > > > This works in conjunction with CPACK to create our installer (using WIX) and > zip file installers. > 7 Copy the application plugins we just build as part of the project > 8 get the OSG plugins from where they live into our bin directory > 9 get the list of OSG libraries (precompiled elsewhere) > 10 copy the OSG Libraries into our bin directory > 11 get all the Qt plugins > 12 get Qt plugins into our bin directory > 13..14 get libraries that we build and depend on into bin (this introspects > on the binary to discover) > > Alas, CMake/CPack cannot "recursively" look at libraries to find what > dependencies exist in the libraries you depend on. And of course, finding > plugins those libraries depend on isn't really possible. I would really like > to see fixup_bundle improved to help handle this sort of thing. I'd even be > willing to pay Kitware to work on it. > > So this is the best we have been able to come up with short of diving into > the source code for cmake and cpack themselves. Hope this helps. > > Lee > > > I have a question about best practice for app bundling especially 3rdparty > libs. In Linux it is not some common to bundle 3rdparty libs with my > application but in windows this is highly recommended. What?s a good way to > bundle 3rdparty libs (mostly .dll, sometimes also .exe) in windows (maybe > macos x has the same ?problem?). > > At the moment i use install(FILES ?) to install the 3rdparty libs (i?ve tried > to install imported target, but thats not possible ). I use a cmake variable > to activate (default is off) to copy 3rdparty libs to the install directory. > The only other way i could go is to add a cpack_install_script file, but this > is only availabe in cpack time. > > So is there a better way to bundle 3rdparty libs or is this the recommended > approach? > > > -- > > 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 > -- 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] CMake/CTest no RUN_TESTS target
Hey, I’ve try to get ctest running with my existing gtest-tests. I have my own findGTest, but should make no difference. My Problem is that I can’t see the RUN_TESTS target (I’m using Visual Studio). I follow the following tutorialhttps:// cmake.org/Wiki/CMake/Testing_With_CTest I’m start using enable_testing() I create my executable in my target-CMakeLists.txt file and add the test to CTest via add_test(MyTestName ThePathToMyExe) CMake should now create a RUN_TESTS target for me, but it does not happen. I’ve I use include(CTest) at the end I get many new targets f.e. continuous, nightly, etc. but no RUN_TESTS What I’m doing wrong? I use CMake 3.4.3 Greetings Tonka -- 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
Re: [CMake] Convert UTF8 to UTF16 (Windows)
Nicholas, you are right. My mistake was that i've used utf8 with BOM, but visual studio only likes without BOM. Thx Am 29.08.2016 09:47 schrieb "Nicholas Braden" <nicholas11bra...@gmail.com>: > Are you sure about this UTF16 requirement? I have many projects > ranging from Visual Studio 2008 to 2015 that use .rc files and all of > them are ANSI/UTF8. > > On Mon, Aug 29, 2016 at 2:43 AM, tonka tonka <tonka3...@gmail.com> wrote: > > Hey, > > > > I have a little problem with files which has to be UTF 16 instead of UTF > 8, > > f.e. Visual studios .rc files. They must be utf16 and git detect it as > bin > > files. > > So my question is: how do you handle these files? > > My rc files has to be generated with configure_file, so my hope was that > > configure_file will read utf8 and write utf16 if I want, but that seems > not > > possible. > > Is there and other way in cake to convert to utf16? > > > > Greetings > > Tonka > > > > > > -- > > > > 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 > -- 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
[CMake] Convert UTF8 to UTF16 (Windows)
Hey, I have a little problem with files which has to be UTF 16 instead of UTF 8, f.e. Visual studios .rc files. They must be utf16 and git detect it as bin files. So my question is: how do you handle these files? My rc files has to be generated with configure_file, so my hope was that configure_file will read utf8 and write utf16 if I want, but that seems not possible. Is there and other way in cake to convert to utf16? Greetings Tonka -- 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
Re: [CMake] Only install one component in cpack
Thx. Works perfectly :-D Am 25.08.2016 13:56 schrieb "Eric Noulard" <eric.noul...@gmail.com>: > Hi Tonka, > > You should read the doc here: > https://cmake.org/cmake/help/v3.5/module/CPackComponent.html > > for the ZIP generator you should > > set(CPACK_ARCHIVE_COMPONENT_INSTALL ON) > this is necessary because archive generator are "MONOLITHIC" by default. > > set(CPACK_COMPONENTS_GROUPING IGNORE) > with this grouping you get on package per component > (the default is to have one package per component **group**) > > This should produce one zip file per component. > Other grouping variant are possible, read the previous doc. > > 2016-08-25 13:45 GMT+02:00 tonka tonka <tonka3...@gmail.com>: > >> Hey, >> >> I want to create a zip file with only one component in it. Installers >> like nsis respect the CPACK_COMPONENTS_ALL settings, but the zip generator >> ignores it. >> >> Can I do that? >> >> Alternatively I would like to split every component into a single zip >> file, I know that it is possible but I forgot how to do that. >> >> Greetings >> Tonka >> >> -- >> >> 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 >> > > > > -- > Eric > -- 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
[CMake] Only install one component in cpack
Hey, I want to create a zip file with only one component in it. Installers like nsis respect the CPACK_COMPONENTS_ALL settings, but the zip generator ignores it. Can I do that? Alternatively I would like to split every component into a single zip file, I know that it is possible but I forgot how to do that. Greetings Tonka -- 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
Re: [CMake] Wrong version of cl.exe for x64
Does cmake call vcvarall.bat itself? Always call vcvarall.bat before cmake itself is not really a nice solution. Setting/override CMAKE_CXX_COMPILER to the x64 toolchain could work, but it depends on the question “does cmake call vcvarall.bat internally“ Am 22.08.2016 10:36 schrieb "J Decker": > > > On Mon, Aug 22, 2016 at 1:33 AM, Nils Gladitz > wrote: > >> On 08/22/2016 10:28 AM, J Decker wrote: >> >> Maybe you need a diferent parameter to vcvarsall before running cmake >> >> https://msdn.microsoft.com/en-us/library/x4d2c09s.aspx >> >> > >> How to: Enable a 64-Bit Visual C++ Toolset on the Command Line >> >> >> To run vcvarsall.bat to use a 64-bit toolset >> >>1. >> >>At the command prompt, change to the Visual C++ installation >>directory. (The location depends on the system and the Visual Studio >>installation, but a typical location is C:\Program Files (x86)\Microsoft >>Visual Studio *version*\VC\.) For example, enter: >> >> To configure this Command Prompt window for 64-bit command-line builds > that target x86 platforms, at the command prompt, enter: > *vcvarsall amd64_x86* > > *shjrug* the article spells it out. > >> >> The visual studio command line environments should have no effect when >> using the visual studio generators. >> They should only be relevant when you use one of the command line >> generators (e.g. makefiles or ninja). >> >> Nils >> > > -- 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
Re: [CMake] Wrong version of cl.exe for x64
Yes, i definitely choose the Win64 version. Am 22.08.2016 09:50 schrieb "Kristian" <kristianonlin...@gmail.com>: > Did you already tried to use the "Visual Studio 10 2010 Win64" generator? > > * https://cmake.org/cmake/help/v3.6/generator/Visual% > 20Studio%2010%202010.html > * https://cmake.org/cmake/help/v3.6/manual/cmake-generators.7.html > > 2016-08-22 9:27 GMT+02:00 tonka tonka <tonka3...@gmail.com>: > >> Hey, >> >> I have recently switched to cmake (instead of plain visual studio). >> Now i discovered a problem.cmake choose the wrong cl.exe for my x64 >> project. >> Cmake choose bin/x86_amd64/cl.exe which is the “x64 Cross Tools“. This >> create x64 binaries, but with my big project I reach a out of memory linker >> error, because the cl.exe is wrong (this cl.exe is an 32bit compiler which >> can create x64 binaries). >> Cmake should choose bin/amd64/cl.exe to use a “real“ x64 compiler. >> >> Does anybody know how I can tell cmake to do that? >> >> Compiler: visual studio 2010 sp1 >> OS: win 7 x64 >> Cmake: 3.4.3 >> >> Greetings >> Tonka >> >> -- >> >> 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 >> > > -- 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
[CMake] Wrong version of cl.exe for x64
Hey, I have recently switched to cmake (instead of plain visual studio). Now i discovered a problem.cmake choose the wrong cl.exe for my x64 project. Cmake choose bin/x86_amd64/cl.exe which is the “x64 Cross Tools“. This create x64 binaries, but with my big project I reach a out of memory linker error, because the cl.exe is wrong (this cl.exe is an 32bit compiler which can create x64 binaries). Cmake should choose bin/amd64/cl.exe to use a “real“ x64 compiler. Does anybody know how I can tell cmake to do that? Compiler: visual studio 2010 sp1 OS: win 7 x64 Cmake: 3.4.3 Greetings Tonka -- 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
[CMake] CPack: Combine Debug and Release build
Hey, I want to switch to cpack to build my zip, installer etc.. Everything works fine, but I am not able to get my debug build into my cpack end file. It will always use the release build, which is fine for end-user deployment but not for and sdk installer, because on windows I have to provide both build-configurations. Can anybody give me some advice what I can do to get such result? Thanks in advance Tonka -- 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
[CMake] Mantis to GitLab - converter?
Dear Kitware, First of all, thank for such great tools like cmake, really enjoy your tools. I’ve saw that you are using GitLab as your sourcecode system. Also I’ve see that you have used Mantis as bugtracker before. I have made the same transition to GitLab, but I’ve not transferred the Manits issues yet. My question is, how do you import the Mantis issue, do you write a tool yourself? If yes, is it opensource/free to use for this onetime convert from Mantis to GitLab. If no, is there any tool which have made the job? Thanks in advance Tonka -- 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