cmake

Cmake file for PortAudio

Hey everyone, I was wondering, do you guys know of a cmake file for portaudio that I could use? Thanks in advance! ...

How do I fix this cmake file? - problem linking to imported library

I'm just starting out with cmake, and trying to set up a fairly simple project. Although the project itself is simple, it links to a number of static libraries which aren't built by cmake. They could be, I suppose - they are my libraries - but I need to sort out how to link to third party libraries anyway. Here is what I have so far... ...

CMake header recognition:

Hi, I'm currently using CMake to build a project, and I have the following problem: I have a library, say 'C', that the files for an executable 'L' need to use (the files in L call on headers from the library in C) Both the library and the executable have to be built in the same project, and though they both go through CMake fine, th...

How to get nmake to push through errors ( behaviour of make -k)

I'm using cmake to generate an nmake build system using the "NMake Makefiles" generator. When I compile, even if I specify "nmake /K", the build stops after the first .cpp file which had an error. I understand that it should not compile targets who have a failed dependency, but several independent source files should be handleable in t...

Building a project with CMake including other libraries which uses different build systems

I am working on an open source project which uses C for libraries, C++ for GUI and Cmake for managing build. This project is just started and have only couple of files. I can successfully generate makefiles on my linux development environment and on windows I can generate Visual Studio project files using CMake. All works well so far. A...

How to Integrate Qt4 qm files into binary using cmake and QRC?

I have a Qt4 CMake project and I'd like to integrate the QM files for i18n into the output binary. These are the rules I have so far for generating the TS and QM files: set(myapp_TRANSLATIONS i18n/myapp_de.ts ) set(FILES_TO_TRANSLATE ${myapp_SRCS} ${myapp_MOC_HDRS} ) QT4_CREATE_TRANSLATION(QM_FILES ${FILES_TO_TRANSLATE} ${...

How to apply different compiler options for different compilers in cmake?

I'm currently working on using cmake to build some projects, with the main platforms being Visual C++, MinGW GCC and Linux GCC. When building with GCC, I need to specify the -Wno-invalid-offsetof compiler option. My current fix is as follows... if ( "${CMAKE_GENERATOR}" MATCHES "^Visual Studio" OR "${CMAKE_GENERATOR}" MATCHES "^N...

Organizing test project and main executable - C & C++

I have the following directory structure. root --src ---tests src contains the source & header files (C files) for the application. When this application is built, it generates an executable. tests directory contains unit test cases (C++ files, using UnitTest++ as testing framework) for the application. In the testing project, I can ...

strange character "â" in cmake generated makefile errors

Terrible title, sorry. I used cmake to generate a makefile and I specified g++ as the C++ compiler and when I run the generated makefile using make or gmake I get all these compile errors and all my symbols have trailing â's on them. Any thoughts on what might be behind these mysterious â's? ...

Python-dependency, windows (CMake)

Hello, all. I have a large, crossplatform, python-dependent project, which is built by CMake. In linux, python is either preinstalled or easily retrived by shell script. But on windows build, i have to install python manually from .msi before running CMake. Is there any good workaround using cmake scripts? PS All other external dependen...

Link the static versions of the Boost libraries using CMake

I've got both the static and the dynamic versions of the boost libraries in /usr/lib. Now I'd like CMake to prefer the static versions during the linkage of my executable. What can I do? Thank you ...

CMake - Automatically add all files in a folder to a target?

I am considering switching a cross platform project from separate build management systems in Visual C++, XCode and makefiles to CMake. One essential feature I need is to add automatically all files in a directory to a target. While this is easy to do with make, it is not easily doable with Visual C++ and XCode (correct me if I am wrong...

How to output compilation dependencies from CMake or make?

I have a CMake C++ project that is rapidly growing and often changing. I'm trying to reduce compile times to a minimum. Often, when I rebuild the project, especially after a header change, I'm surprised at how many compilation units need to be recompiled. I'm trying to identify #includes that can possibly be avoided, for example by usin...

Add compiler flag for Visual Studio 2005 with CMake 2.8.1

Probably an easy beginners question: I want to add the compiler flag /EHsc to my project and tried both SET_TARGET_PROPERTIES(name_of_my_project PROPERTIES COMPILER_FLAGS "/EHsc") and SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc") in my CMakeLists.txt. With both, CMake generates a Visual Studio Solution without complaining. EDI...

Can CMake generate build scripts which do *not* use cmake?

Question: Can CMake generate build scripts that do not, in any way, use CMake? If not, how hard is it to gut a CMake generated automake script to not make any checks against CMake? I am a big fan of CMake to the point where I am championing the idea that we transition to it in my current work environment. One thing that could ease this ...

Ada: cmake and PLplot installation on Windows

This is a follow-up of the post at http://stackoverflow.com/questions/3210207/ada-plotting-2d-graphs . I decided to create a new post as this is a separate issue. The installation of PLplot for Windows is at: http://www.miscdebris.net/plplot_wiki/index.php?title=Specifics_for_various_platforms#Windows . The installation is as follows: c...

How to change package destination folder in CPack?

I have a multiple module CMake project with a root CMakeLists.txt with multipe add_subdirectory macros. As far as I understand the default for CPack/CMake is to create package in project root folder, where root CMakeLists.txt resides. I would like to create a separate install module, with its own folder and create packages there? How to...

set_target_properties called with incorrect number of arguments???

Here is my simple CMakeLists.txt file: include_directories (${CMAKE_SOURCE_DIR}/common) find_package(Threads) add_library (libusbmuxd SHARED libusbmuxd.c sock_stuff.c ${CMAKE_SOURCE_DIR}/common/utils.c) find_library (PTHREAD pthread) target_link_libraries (libusbmuxd ${CMAKE_THREAD_LIBS_INIT}) # 'lib' is a UNIXism, the proper CMake ta...

Howto resolve compiler specific runtime initialization functions for a library from the main application

What is the best practice when doing a mixed language library where the library language requires a runtime initialization? I have a problem where I'd like to create a certain library in Fortran which is to used from C++. I'd want to preserve platform independence and compiler independence if possible. Now, the two compilers I have play...

CMake and XCode - disable CMake ReRun and CMake PostBuild Rules default generation

I want to disable the additional dependency check generated for an XCode project (and possibly also the CMake cache update verification), since this increase very very much the entire build time (about three times in my case). With Visual C++ is sufficient to set the flag SET(CMAKE_SUPPRESS_REGENERATION TRUE) but in XCode it does not...