[CMake] Why there is not MSI installer for CMake?
It is well known that msi installers are more preferable way of distributing apps on Windows than exe installers. For example msi packages can be installed silently from command line. So why there is no msi package for cmake? Regards, Alexey -- 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] Get Visual Studio target Arch
I want to use different library folders for x64/x86/arm architectures. Cmake has different generators for each arch: "Visual Studio 12 2013", "Visual Studio 12 2013 ARM", "Visual Studio 12 2013 Win64". Is there any cmake var to get visual studio target arch? CMAKE_SYSTEM_PROCESSOR is always AMD64 for me no matter what generator I'm using. -- 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] Get Visual Studio target Arch
I dont want to go dirty way with if ("${CMAKE_GENERATOR}" STREQUAL ...) On Sat, Sep 6, 2014 at 5:02 PM, Alexey Petruchik wrote: > I want to use different library folders for x64/x86/arm architectures. > Cmake has different generators for each arch: "Visual Studio 12 > 2013", "Visual Studio 12 2013 ARM", "Visual Studio 12 2013 Win64". Is there > any cmake var to get visual studio target arch? CMAKE_SYSTEM_PROCESSOR is > always AMD64 for me no matter what generator I'm using. > -- 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] Get Visual Studio target Arch
There are also CMAKE_CL_64\CMAKE_FORCE_WIN64\CMAKE_FORCE_IA64 vars. But it seems to be a x64-only hack not a good generic solution On Mon, Sep 8, 2014 at 3:15 PM, Alexey Petruchik wrote: > I dont want to go dirty way with if ("${CMAKE_GENERATOR}" STREQUAL ...) > > > On Sat, Sep 6, 2014 at 5:02 PM, Alexey Petruchik < > alexey.petruc...@gmail.com> wrote: > >> I want to use different library folders for x64/x86/arm architectures. >> Cmake has different generators for each arch: "Visual Studio 12 >> 2013", "Visual Studio 12 2013 ARM", "Visual Studio 12 2013 Win64". Is there >> any cmake var to get visual studio target arch? CMAKE_SYSTEM_PROCESSOR is >> always AMD64 for me no matter what generator I'm using. >> > > -- 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] Get Visual Studio target Arch
It would be really great to get comprehensive answer from one of cmake devs. On Mon, Sep 8, 2014 at 4:01 PM, Nils Gladitz wrote: > On 09/08/2014 02:51 PM, Alexey Petruchik wrote: > >> There are also CMAKE_CL_64\CMAKE_FORCE_WIN64\CMAKE_FORCE_IA64 vars. But >> it seems to be a x64-only hack not a good generic solution >> > > There seem to be MSVC_C_ARCHITECTURE_ID and MSVC_CXX_ARCHITECTURE_ID > though given that I don't see them documented they are probably considered > internal. > > 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] Get Visual Studio target Arch
Hi, Gilles. First of all it is great to hear that Microsoft engineers are aware of cmake and even maintain fork that adds more Visual Studio compatibility. Great work! Adding ability to generate one unified solution with multiple architecture support is nice. It is really much better than regenerating solution for each platform all the time. But I dont see how this solves my original issue. Actually it even make it worse. What I want to do is to specify different CMAKE_LIBRARY_PATH for different target arch so when I build my project for Win32 arch I'll use prebuilt libs from win32/libs/x86 forlder, and when I build for x64 arch - win32/libs/x64 folder. Of course I can rename my folders so they correspond to $(Platform) var in VS but this doesn't look like a solid solution for me. I still cant really make some arch specific ifdefs in my cmake scripts using this approach. In my opinion we should fix CMAKE_SYSTEM_PROCESSOR behaviour on Windows. It doesnt look sane for me when var that should be defined as "The name of the CPU CMake is building for." is defined as AMD64 for ARM build. Another wish is that installer of your fork should by default install to different dir than vanilla cmake and even have different binary names. This will make easier side by side installation of cmakems and vanilla cmake. Regards, Alexey On Thu, Sep 11, 2014 at 6:36 PM, Gilles Khouzam < gilles.khou...@microsoft.com> wrote: > Hi Greg, > > You might want to check out our current fork of CMake on > http://cmakems.codeplex.com. I've just added support for multiplatform > support for Windows Phone and Windows Store app in a similar way that it is > done for iOS. > > You can try the build on http://cmakems.codeplex.com/releases/view/132284 > or use the MSMultiPlatform branch. This will generate one solution that can > target Win32/ARM/x64 placing each architecture in a folder based on the > platform name (using the $(Platform) variable in VS. > > To enable this, add the following define: > CMAKE_VS_EFFECTIVE_PLATFORMS=Win32;ARM;x64 and code for all three platforms > will be generated. We'd love to understand the type of issues you might run > into with this and how we can make it better. > > Thanks > ~Gilles > > -Original Message- > From: CMake [mailto:cmake-boun...@cmake.org] On Behalf Of Gregor Jasny > Sent: Monday, September 8, 2014 12:06 > To: cmake@cmake.org; Alexey Petruchik > Subject: Re: [CMake] Get Visual Studio target Arch > > On 06/09/14 16:02, Alexey Petruchik wrote: > > I want to use different library folders for x64/x86/arm architectures. > > Cmake has different generators for each arch: "Visual Studio 12 2013", > > "Visual Studio 12 2013 ARM", "Visual Studio 12 2013 Win64". Is there > > any cmake var to get visual studio target arch? CMAKE_SYSTEM_PROCESSOR > > is always AMD64 for me no matter what generator I'm using. > > All the already available stuff in cmake is not sufficient. Especially if > you start to cross compile. > > I use the pre-defined C/C++ preprocessor symbols for that: > > include(CheckSymbolExists) > > if(WIN32) > check_symbol_exists("_M_AMD64" "" RTC_ARCH_X64) > if(NOT RTC_ARCH_X64) > check_symbol_exists("_M_IX86" "" RTC_ARCH_X86) > endif(NOT RTC_ARCH_X64) > # add check for arm here > # see http://msdn.microsoft.com/en-us/library/b0084kay.aspx > else(WIN32) > check_symbol_exists("__i386__" "" RTC_ARCH_X86) > check_symbol_exists("__x86_64__" "" RTC_ARCH_X64) > check_symbol_exists("__arm__" "" RTC_ARCH_ARM) > endif(WIN32) > > Now you could write: > > if(RTC_ARCH_X64) > set(MY_LIB_DIR x64) > elseif(RTC_ARCH_X86) > set(MY_LIB_DIR x86) > elseif(RTC_ARCH_ARM) > set(MY_LIB_DIR x86) > else() > message(FATAL_ERROR "Unknown architecture") > endif() > > I hope this helps. > > Thanks, > Gregor > -- > > 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 FA
Re: [CMake] Get Visual Studio target Arch
> No "CMake time" decisions are possible based on the configuration I have a project that uses some unix libraries. I use find_package() to locate them. On Windows platform find_package() obviously fails so I maintain folder with prebuilt binaries. So my CMakeLists.txt looks like: if (${CMAKE_SYSTEM_NAME} MATCHES "Windows") set(CMAKE_LIBRARY_PATH "win32/x86/lib") endif() find_package(A REQUIRED) find_package(B REQUIRED) find_package(C REQUIRED) Now I want to add x64 build support. Obviously now it fails when tries to link x64 binary to x86 prebuilt libs. I cant use CMAKE_SYSTEM_PROCESSOR because its always defined to AMD64. Also I cant use VS $(Platform) variable because find_package() runs at "cmake time". So how I should handle it without "cmake time" decisions? Use internal undocumented MSVC_C_ARCHITECTURE_ID? Use CMAKE_CL_64\CMAKE_FORCE_WIN64\CMAKE_FORCE_IA64 vars that are x64-only hack that will fail for ARM build? Use CMAKE_GENERATOR var and find "Win64"\"ARM" substrings in it? I'm really running out of ideas and will appreciate any help in this question. Regards, Alexey On Wed, Sep 17, 2014 at 2:35 AM, Gilles Khouzam < gilles.khou...@microsoft.com> wrote: > Hi David, Alexey > > I'm glad to hear your enthusiasm about our involvement with CMake. We're > still trying to understand the issues that people are facing and how we can > help improve those. The multi-platform support is something somewhat > experimental that will have issues, but getting feedback will help address > the issues that you might run into. > > Alexey, the issue with CMAKE_SYSTEM_PROCESSOR seems to come from the > CMakeDetermineSystem.cmake (lines 110 and below) file which only sets it > for WINCE based on the MSVC_C_ARCHITECTURE_ID and uses the HOST processor > otherwise. That's probably why you're seeing AMD64 all the time. My initial > thought is that using MSVC_C_ARCHITECTURE_ID should give you at least the > right processor for the compile. > > BTW, I've only enabled the multiplatform support for cross-compiling for > Windows Phone and Windows Store apps (to reduce the potential regressions) > but if you would like to have it for native Windows apps, I should be able > to easily enable it. > > Looking forward to being able to help more. > > Gilles Khouzam > Senior Development Lead > Microsoft OSG > > -Original Message- > From: David Cole [mailto:dlrd...@aol.com] > Sent: Tuesday, September 16, 2014 03:37 > To: alexey.petruc...@gmail.com; Gilles Khouzam > Cc: cmake@cmake.org > Subject: Re: [CMake] Get Visual Studio target Arch > > > I still cant really make some arch specific ifdefs in my cmake scripts > > using this approach. > > > That's the point of a multi-configuration, multi-architecture Visual > Studio solution: you defer choosing the configuration *and* the > architecture until build time. > > No "CMake time" decisions are possible based on the configuration or the > architecture with this approach because neither is known until compile time. > > It is inappropriate to "choose the configuration or architecture" in CMake > code with this approach, and you should re-think about it and see if you > can make compile time decisions instead, possibly with #ifdef sections in > your C/C++ code... > > Rather than re-organize your libraries, you could easily just use > "win32/libs/$(Platform)" as your value when using the VS generators, and > this should work. > > > By the way, Gilles, I echo the sentiment: nice work! I wish MS had gotten > involved in CMake even earlier... but welcome! > > > HTH, > David C. > > > -- 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] How to build shared library as bundle on OS X?
I have a shared library. To build it as framework i write: set_target_properties(lib_name FRAMEWORK TRUE) How I build it as bundle? Please dont confuse library bundle with application bundle. Regards, Alexey -- 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] Remove -D${target_name}_EXPORTS from shared library compilation flags
I know it's a bit weird but I need it. I'm currently working on moving make-based project to cmake. I want to get absolutely the same flags as current makefiles have, so I need to remove autogenerated -D${target_name}_EXPORTS. set_property(TARGET a PROPERTY DEFINE_SYMBOL "") is not working for me. Can anyone help me with this issue? Regards, Alexey -- 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] Tiny cmake question
Is it possible to rewrite: if (${OPENSSL_FOUND}) option(USE_OUR_OWN_MD5 "Build using own md5 implementation" OFF) else() option(USE_OUR_OWN_MD5 "Build using own md5 implementation" ON) endif() in one line? Something like: option(USE_OUR_OWN_MD5 "Build using own md5 implementation" NOT OPENSSL_FOUND) Regards, Alexey -- 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] Visual Studio Project System Extensibilty
Microsoft recently announced Project System Extensibility in Visual Studio 2015. http://blogs.msdn.com/b/visualstudio/archive/2015/06/02/introducing-the-project-system-extensibility-sdk-preview.aspx Just curious if this can be used to let Visual Studio directly open CMake projects? -- 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] OS X dynamic library install_name
Hi, everybody. This question could have been already risen but hadn't found any "pretty" solution. The question is: How to set install name for OS X dynamic library to "@exectuable_path/../Frameworks/libX.dylib" or "@rpath/libX.dylib"? My solution is: set_target_properties(X PROPERTIES XCODE_ATTRIBUTE_LD_DYLIB_INSTALL_NAME "@executable_path/libX.dylib") but I'm still not sure that it is the way to go. In this case project would be built correctly only via generating Xcode project which is probably no very good. Are there any other way to specify install name or it is absolutely normal to use XCODE_ATTRIBUTE_LD_DYLIB_INSTALL_NAME? Regards, Alexey. -- 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
[CMake] CMake fails to find zlib on OS X Mountain Lion
Hi, all. I have a fresh install of OS X Mountain Lion. Xcode installed. CMake fails to locate zlib headers: CMake Error at /Applications/CMake 2.8-10.app/Contents/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:97 (message): Could NOT find ZLIB (missing: ZLIB_INCLUDE_DIR) Call Stack (most recent call first): /Applications/CMake 2.8-10.app/Contents/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:291 (_FPHSA_FAILURE_MESSAGE) /Applications/CMake 2.8-10.app/Contents/share/cmake-2.8/Modules/FindZLIB.cmake:85 (FIND_PACKAGE_HANDLE_STANDARD_ARGS) CMakeLists.txt:42 (find_package) But they are located at: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/usr/include Any way to tell cmake to look for headers\libraries inside Xcode bundle without hardcoding this path? Regards, Alexey -- 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
[CMake] Set dmg background with CPack
Hi, all. I'm creating dmg using CPack via setting CPACK_GENERATOR to DragNDrop. I need to set background image for dmg. I'm trying to use CPACK_DMG_BACKGROUND_IMAGE. It actually copies background.png to dmg and makes it hidden. But when I mount generated dmg I still have white background instead of picture. Any reason why it is not working? Are there any tutorials how generate fancy drag'n'drop dmg via cpack? Regards, Alexey -- 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
Re: [CMake] Setting XCode Runtime Search Path
Hi, I'm doing this by adding: set(CMAKE_XCODE_ATTRIBUTE_LD_RUNPATH_SEARCH_PATHS "@executable_path/../Frameworks") to my CMakeLists.txt. Not sure that this is the way it should be done but at least it works ;) Regards, Alexey On Wed, Feb 20, 2013 at 1:13 AM, Darrell Blake wrote: > Is there any way to set the XCode "Runtime Search Path" linker setting? > I've got a framework that was built using @rpath so I'm having to set the > Runtime Search Path setting to @executable_path/../Frameworks so it can be > found. I just wondered if there was any way to set it from CMake. > > Darrell > > > -- > > 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 > -- 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
[CMake] Different CMAKE_LIBRARY_PATH for Debug and Release builds
For windows build I have win32/libs folder with prebuilt libraries in my source code repo. Debug versions live in win32/libs/x86/debug, release ones in win32/libs/x86/release. How I can achieve linking to different libraries for different configurations in Visual Studio? Something like set(CMAKE_LIBRARY_PATH "win32/libs/x86/${CMAKE_BUILD_TYPE}) doesn't work for me because CMAKE_BUILD_TYPE seems to be undefined at project generation time. -- 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://www.cmake.org/mailman/listinfo/cmake