[CMake] CMake fails on Win7 x64 with VS 2012

2013-12-28 Thread Ansis Māliņš
The minimal CMakeLists.txt with content CMAKE_MINIMUM_REQUIRED(VERSION 2.8) PROJECT(CMakeTest) on CMake 2.8.12.1 on Windows 7 64 bit with Visual Studio 2012 produces the result CMake Error at C:/Program Files (x86)/CMake 2.8/share/cmake-2.8/Modules/CMakeDetermineCompilerId.cmake:446

Re: [CMake] CMake fails on Win7 x64 with VS 2012

2013-12-28 Thread Ansis Māliņš
Yes, I'm using Visual Studio 11 (aka 2012) generator. On Sat, Dec 28, 2013 at 3:04 PM, John Drescher dresche...@gmail.com wrote: On Sat, Dec 28, 2013 at 8:35 AM, Ansis Māliņš ansis.mal...@gmail.com wrote: The minimal CMakeLists.txt with content CMAKE_MINIMUM_REQUIRED(VERSION 2.8

Re: [CMake] CMake fails on Win7 x64 with VS 2012

2013-12-28 Thread Ansis Māliņš
Yes. It shouldn't matter though. On Sat, Dec 28, 2013 at 3:08 PM, John Drescher dresche...@gmail.com wrote: On Sat, Dec 28, 2013 at 9:05 AM, Ansis Māliņš ansis.mal...@gmail.com wrote: Yes, I'm using Visual Studio 11 (aka 2012) generator. Did you try running cmake-gui from a Visual Studio

Re: [CMake] Where to put generated files.

2013-06-12 Thread Ansis Māliņš
Build directory. Every time. No exceptions.​ -- 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

Re: [CMake] Listing headers in source lists

2013-06-11 Thread Ansis Māliņš
No, it's not necessary, and you don't have to list them. In fact, I didn't know you *can* list them. -- 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:

Re: [CMake] Cross-platform build under Windows targeting Linux

2013-06-10 Thread Ansis Māliņš
Don't bother. Setting up VirtualBox https://www.virtualbox.org/ with Lubuntu http://www.lubuntu.net/ is way easier.​ -- 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

Re: [CMake] make superclean target? (i.e. clear *everything*)

2013-04-04 Thread Ansis Māliņš
What would be the benefit of such a command besides syntax? -- 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

Re: [CMake] Link different libraries in different targets

2013-04-02 Thread Ansis Māliņš
Just add more link_directories commands or put more arguments in the one your have: link_directories(/path/to/libA path/to/libB) -- 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

Re: [CMake] Do not build targets whose dependencies are not available

2013-03-19 Thread Ansis Māliņš
find_package(a) if(a_FOUND) ExternalProject_Add(b PREFIX blabla ...) endif() On Mon, Mar 18, 2013 at 7:57 PM, Chris Stankevitz chrisstankev...@gmail.com wrote: Hello, I have a library target (a) that is a dependency of an executable (b). I have many more libraries and many more

Re: [CMake] Read-only files lose their read-only attribute when packaged using either ZIP or NSIS

2013-03-08 Thread Ansis Māliņš
Out of curiosity, what is the read-only flag good for anyway? -- 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

Re: [CMake] ExternalProject and hardwired src directory

2013-03-05 Thread Ansis Māliņš
I don't think you're supposed to set PREFIX to a system path. To avoid needing root to configure and compile among other things. I always set PREFIX to CMAKE_BINARY_DIR and so far I can't imagine any reason to ever set it to anything else. -- Powered by www.kitware.com Visit other Kitware

Re: [CMake] ExternalProject and hardwired src directory

2013-03-05 Thread Ansis Māliņš
You can override parts of PREFIX with these TMP_DIR = prefix/tmp STAMP_DIR= prefix/src/name-stamp DOWNLOAD_DIR = prefix/src SOURCE_DIR = prefix/src/name BINARY_DIR = prefix/src/name-build INSTALL_DIR = prefix -- Powered by www.kitware.com Visit other Kitware

Re: [CMake] Resolving static lib dependency at executable link time

2013-02-25 Thread Ansis Māliņš
libB depends on libC and libC depends on libB. How is that even possible? You compile B and it fails because there's no C yet. You compile C and it fails because there's no B yet. -- Powered by www.kitware.com Visit other Kitware open-source projects at

Re: [CMake] Please critique my hello world CMakeLists.txt and Config.cmake

2013-02-24 Thread Ansis Māliņš
# You don't need the .in file. CMAKE_MINIMUM_REQUIRED(VERSION 2.8) PROJECT(hello) set (hello_VERSION_MAJOR 1) set (hello_VERSION_MINOR 1) ENABLE_TESTING() ADD_LIBRARY(hello hello.cpp) # This works just the same. Unless I'm missing something. SET(hello_INCLUDE_DIRS

Re: [CMake] how to compile as 32bit on a 64bit Linux host ?

2013-02-15 Thread Ansis Māliņš
The *easiest* way is to use a virtual machine. -- 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

Re: [CMake] Wrapper for cmake (configure-script)

2013-02-14 Thread Ansis Māliņš
So, it's for, for example, Slackware or Gentoo users, who install everything from source and have the ./configure make make install combo ingrained in their motor memory? On Thu, Feb 14, 2013 at 10:59 AM, Richard Wiedenhöft richard.wiedenho...@gmail.com wrote: Hello, I recently started

Re: [CMake] Best way to 'pull through' dependencies of External projects?

2013-02-14 Thread Ansis Māliņš
If I guessed right, your problem is linker errors when building your project. My solution is to just manually add whatever extra target_link_libraries are needed to shut the linker up and move on. On Thu, Feb 14, 2013 at 5:48 PM, Nick Overdijk n...@astrant.net wrote: I don't really get your

Re: [CMake] comparing strings

2013-02-14 Thread Ansis Māliņš
Uh, why are you talking about STREQUAL when the problem is with set(baz foo)? It should set baz to foo not bar because there are no ${} around foo. -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages

Re: [CMake] comparing strings

2013-02-14 Thread Ansis Māliņš
Never mind, I get it. What a landmine! -- 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

Re: [CMake] CPack: Packaging debug and release configurations in a single zip

2013-02-07 Thread Ansis Māliņš
How about something like this: if(${CMAKE_BUILD_TYPE STREQUAL DebugAndRelease) include(ExternalProject) ExternalProject_Add(MEDEBUG CMAKE_FLAGS -DCMAKE_BUILD_TYPE Debug) ExternalProject_Add(MERELEASE CMAKE_FLAGS -DCMAKE_BUILD_TYPE Release) install(FILES ...)

Re: [CMake] Linker command line length issues when cross-compiling from Windows-Linux

2013-02-06 Thread Ansis Māliņš
In case you haven't thought of it, you could run actual Linux in VirtualBox and not have to deal with cross compilation. -- 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

[CMake] When should I use add_subdirectory and when ExternalProject?

2013-02-04 Thread Ansis Māliņš
If I have a dependency (e.g. SDL2) that seems to work with add_subdirectory just fine, should I still use ExternalProject_Add instead? Given both ways work, what should I prefer? What are the tradeoffs? -- Powered by www.kitware.com Visit other Kitware open-source projects at

Re: [CMake] When should I use add_subdirectory and when ExternalProject?

2013-02-04 Thread Ansis Māliņš
, 2013 at 9:23 AM, Ansis Māliņš ansis.mal...@gmail.comwrote: If I have a dependency (e.g. SDL2) that seems to work with add_subdirectory just fine, should I still use ExternalProject_Add instead? Given both ways work, what should I prefer? What are the tradeoffs? -- Powered by www.kitware.com

[CMake] External dependencies and Windows

2013-02-04 Thread Ansis Māliņš
I'm just learning CMake and posting questions in this mailing list, but the answers I get only confuse me. It seems I must take a step back and ask more general questions. In Linux there is a package for everything, so you just find_package whatever you need. But on Windows most libraries exist

Re: [CMake] External dependencies and Windows

2013-02-04 Thread Ansis Māliņš
, Feb 4, 2013 at 12:43 PM, Ansis Māliņš ansis.mal...@gmail.comwrote: I'm just learning CMake and posting questions in this mailing list, but the answers I get only confuse me. It seems I must take a step back and ask more general questions. In Linux there is a package for everything, so you just

Re: [CMake] External dependencies and Windows

2013-02-04 Thread Ansis Māliņš
, especially for rather popular things such as Python or Qt. The whole situation is referred to as DLL hell: http://en.wikipedia.org/wiki/DLL_Hell Michael On Mon, Feb 4, 2013 at 1:43 PM, Ansis Māliņš ansis.mal...@gmail.comwrote: If shared libraries on Windows are truly shared, then why so many

Re: [CMake] External dependencies and Windows

2013-02-04 Thread Ansis Māliņš
It looks like I'm still asking the wrong questions. As a last resort, here's my specific problem: I want to compile and run a hello world SDL2 application on Windows, Linux, and OS X - purely as an exercise in CMake. How would YOU do this? SDL2 only exists in source form in their repository.

Re: [CMake] When should I use add_subdirectory and when ExternalProject?

2013-02-04 Thread Ansis Māliņš
SuperBuild pattern Tell me all about it! -- 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

[CMake] Why does ExternalProject require root access?

2013-01-20 Thread Ansis Māliņš
The line ExternalProject_Add(bullet PREFIX ${PROJECT_SOURCE_DIR}) fails with Install the project... -- Install configuration: Release CMake Error at cmake_install.cmake:38 (FILE): file cannot create directory: /usr/local/lib/pkgconfig. Maybe need administrative privileges. Why? How do I

Re: [CMake] Why does ExternalProject require root access?

2013-01-20 Thread Ansis Māliņš
I use add_subdirectory to add bullet and sdl.. Could you try that? That's what I tried initially, but another external project dependent on Bullet, btOgre, failed to find_package(Bullet). I think it's because when CMake configures btOgre it expects Bullet binaries to be built and installed

Re: [CMake] Why does ExternalProject require root access?

2013-01-20 Thread Ansis Māliņš
There is no Bullet package for Ubuntu. But most importantly there is no such thing as packages in Windows. So I have to build it into my app. I also want to avoid having to alter the CMake files of my dependencies. I want other devs to be able to just check out the latest version of Bullet into a