Tag: cmake

How to trigger a CMake reconfigure when the output of a command changes

I’m looking to trigger a CMake configure to occur when the output of a command changes; Specifically I am looking at trying to make CMake configure when the output of git describe –always –dirty has change from the previous time CMake was configured. Most of this problem can be solved by watching the HEAD file […]

how to embed DVCS revision information when building without it

In my build system, every time I run a new build I save revision and hash information of the current commit in a few variables, and use them in my sources without issues. For example the window title is formatted like “NAME-REVISION-HASH”. The only problem of this is that sometimes people build the project by […]

Eclipse doesn't recognise git-based project

I’ve cloned a git cmake project to a directory sourcedir. I created a .project file with cd build cmake -G”Eclipse CDT4 – Unix Makefiles” -D CMAKE_BUILD_TYPE=Debug sourcedir I then imported the project in eclipse, which works fine. The source files are in a folder in the project explorer called [Source directory]. But how can I […]

Unable to link the output (static library) of an external git CMake project to a CMake project

I’m having trouble trying to link a library that I recently pushed onto Git to my CMake project. I have named the library octal (GitHub) and am trying to link it to my other library bulletframe (GitHub). Both projects are created by me. I anticipated that linking the library wouldn’t work the first time, so […]

git ignores empty folders

Currently my project structure looks like this: project .git include source test and I want to add a “build” directory to it, so that people know where to build with cmake. I want the build directory to be empty, so in my .gitignore I added: build/* so that it ignores everything in that directory. The […]

What is the Difference between Installation OpenCV by Using the Pre-built Libraries & by Making Own Libraries from the Source Files?

I need 2 know the Difference between Installation OpenCV 1. By Using the Pre-built Libraries ? 2. By Making Own Libraries from the Source Files ? When we do first one we have to only download OpenCV new version and extract it, and configure it with Visual studio using CMake. But why we are going […]

How to get git branch/tag names in CMake, from external project?

Is it possible to list all git branches or tags in cmake configure step (in ccmake/cmake-gui)? I want to allow the user to select a specific branch/tag (available on current repository), which will be used in build (make) step for download external project. Inital CMakeLists.txt file: cmake_minimum_required (VERSION 2.8) project (project_name) find_package (Git) if (GIT_FOUND) […]

cmake: You have called ADD_LIBRARY for library cryptopp without any source files

Windows 64bit using cmake to compile c++ project: github.com/iHateInventNames/synergy-through-usb I fixed a previous issue in this post: Compile issues: LIBUSB_1 with cmake project on Windows So when I hit cmake now I get the following error: > cmake . — Found libusb-1.0: — – Includes: C:/local/libs/libusbx — – Libraries: C:/local/libs/libusbx/libusb-1.0.lib You have called ADD_LIBRARY for […]

How to create Xcode project from already existing git cmake project?

I am new to OSx, can someone help to create Xcode project from existing code? I want to try some features of Xcode like ‘profile’. I currently use Clion for my cmake project, it is also in git repo. I simply want to import it from Xcode but it’s not that easy I guess. Here […]

cmake: retrieve library from git before using in a main cmakelists

I’m getting Catch library from github via additional cmakelists.txt which is included into main one: cmake_minimum_required(VERSION 3.2) project(MyProject) add_subdirectory(ext/catch) include_directories(${CATCH_INCLUDE_DIR} ${CXXOPTS_INCLUDE_DIR} src) … Where CmakeLists.txt for Catch is: cmake_minimum_required(VERSION 2.8.8) project(catch_builder CXX) include(ExternalProject) find_package(Git REQUIRED) ExternalProject_Add( catch PREFIX ${CMAKE_CURRENT_SOURCE_DIR} GIT_REPOSITORY https://github.com/philsquared/Catch.git TIMEOUT 10 UPDATE_COMMAND ${GIT_EXECUTABLE} pull CONFIGURE_COMMAND “” BUILD_COMMAND “” INSTALL_COMMAND “” LOG_DOWNLOAD ON ) […]

Git Baby is a git and github fan, let's start git clone.