cmake

Custom Directory for CMake Library Output

In CMake, I can't seem to output my library in ../out/library, only library. When I do the ../out/library path, it tells me it can't find the library, as if it wants to link to it. add_library(../out/JE3D ../source/CDeviceLayerSDL.cpp) There's more files, I'm just saving space. When I do that, I get this error. Linking CXX static ...

linker error using wxwidgets with cmake

HI, I'm getting following linker error when I compile my program with VS2008 solution which is created with CMake for my wxwidgets based application. *error LNK2019: unresolved external symbol main referenced in function __tmainCRTStartup* but, same program I'm able to compile with normal VS2008 solution which is not created with CMake...

How do I tell cmake I want my project to link libraries statically?

I'm trying to build an OpenCV-based project using CMake, running on Linux. So far my CMakeLists.txt files looks something like FIND_PACKAGE (OpenCV REQUIRED) ... TARGET_LINK_LIBRARIES (my-executable ${OpenCV_LIBS}) but this results in dynamically linked libraries. How do I link with static libraries? Update: The default build for Ope...

Building QGIS for Windows with mingw and Cmake?

Hi, Does anyone knows how to build QGIS for Windows with mingw and Cmake? Having that I have all required dependencies installed. Thanks, Carlos. ...

Compiling Ogitor with mingw

I'm compiling program (Ogitor) from source with mingw. The program compilation configure by CMake (use boost, ogre). Last part of mingw32-make's log: ....... Info: resolving Ogre::Math::NEG_INFINITY by linking to imp_ZN4Ogre4Math 12NEG_INFINITYE (auto-import) Creating library file: ..\lib\libOgitor_d.dll.a c:/qt/mingw...

cmake: figuring out which libraries is a binary target linked against

I wand to implement in CMake a functionality that would enable the installation of a single binary/target through a make install-TARGET command. This is fairly straightforward to do with a custom target. However, when the target binary in question is linked dynamically against other libs of the project (BUILD_SHARED_LIBS=ON), I need to i...

CMake: how to produce binaries "as static as possible"

I would like to have control over the type of the libraries that get found/linked with my binaries in CMake. The final goal is, to generate binaries "as static as possible" that is to link statically against every library that does have a static version available. This is important as would enable portability of binaries across different...

Compiling libraries with CMake under Cygwin

I have been trying to compile TinyXML using CMake as a sort of mini project, trying to learn CMake. As an addition I am trying to make it compile into a dynamic library and install itself so it works. So far I have managed to get it to compile and install BUT it compiles into a .dll and a .dll.a and the only way to get it to work is to ...

Overriding a default option(...) value in CMake from a parent CMakeLists.txt

I am trying to include several third-party libraries in my source tree with minimal changes to their build system for ease of upgrading. They all use CMake, as do I, so in my own CMakeLists.txt I can use add_subdirectory(extern/foo) for libfoo. But the foo CMakeLists.txt compiles a test harness, builds documentation, a shared library wh...

Cmake compile with Frameworks on Mac OSX and treat .cpp files like .m/.mm

...

RUBY_LIBRARY cmake variable when building Qpid

Im trying to build Qpid. When running CMake this is printed to the log: Could NOT find Ruby (missing: RUBY_LIBRARY) [ ... more stuff cut for brevity ] CMake Error at src/CMakeLists.txt:96 (include): include could not find load file: C:/qpid/0.6/qpid/build/src/rubygen.cmake It seems to be failing because it couldnt find a fi...

use CMake to get build-time svn revision

With CMake I can get the svn revision using Subversion_WC_INFO. However, this only happens at configure time-- every subsequent make will use this cached revision. I'd like to get the svn revision at build time (ie, every time make is run). How can I do this? ...

add_definitions vs. configure_file

I need to conditionally compile several parts of code, depending on whether there are some libraries present on the system or not. Their presence is determined during the CMake configuration phase and I plan to tell the compiler the results using preprocessor definitions (like #ifdef(LIB_DEFINED) ... #endif). I know about two possibili...

CMake generate Visual Studio 2008 solution for Win32 and x64

I am using CMake 2.8 under Windows XP and want to generate a Visual Studio 2008 solution file which contains Release and Debug configurations for both Win32 and x64. Can this be done by setting a CMake configuration variable in the CMakeLists.txt file? ...

CMake sdl-config

Is there a way to use sdl-config in CMake? ...

Generating redistributable Visual Studio project with cmake

Hi, is it possible to generate Visual Studio projects that are redistributable with CMake? The project file in question are examples/demos of our library. We don't want that our customers have to install cmake (and learn what to do with it) just to compile a few examples. The problem with CMake generated project files is that they co...

Cmake doesn't find Boost

Hello I'm trying to configure a project using CMake, but it fails to find Boost libraries even though they are in the specified folder. I have specified Boost_INCLUDE_DIR, Boost_LIBRARYDIR and BOOST_ROOT , but I still get an error saying that CMake is not able to find Boost. What could be the reason of such error? ...

CMake and absolute header paths

Hi folks, I've been googling for a while and I no result yet so I turn to you guys ^^ I'm trying to use CMake to build my C++ project and I have a problem in the header paths. Since I'm using a lot of classes organized in several directories, all my include statements are with absolute paths (so no need to use "../../") but when try to...

Issue using CMake : gtk module

I'm attempting to compile zzogl using CMake and I keep running into issues. My first issue stated that I needed pkgconfig, so I installed that, for which I also had to install MacPorts. Then it said I needed gtk+-2.0 module, so I got that too. After that took forever to install, I still get this error: checking for module 'gtk+-2.0' ...

CMake: defining link directories and libraries for different build targets

I have a vs2008 project here. Its project files are generated by CMake. What I want to do is define libraries and library directories for the Debug and Release target independently, i.e. release libs for the release target and debug libs for the debug target of course. So far I have no idea how to do this. I know I can define different ...