CMake
とりあえず xxx-config.cmakeさえ作っておけば良い? static library add_libraryでSTATICを指定 ファイルの出力先はset_target_properties(ARCHIVE_OUTPUT_DIRECTORY ${DIR_TO_OUTPUT})で指定 shared library add_libraryでSHAREDを指定 ファイルの出力先は…
デフォルトのコンパイラでclangが選ばれちゃう. シンボリックリンクの参照先をインストールしたgcc, g++に設定したものの,CMakeで選択されるデフォルトコンパイラはclangのままだった. 解決策はコンパイラの指定 コンパイラの指定を選択 コンパイラの指定…
目標は以下の通り. - RealSsnse d435をMac OSXで使えるようにする - pythonでも使えるようにする 公式のreadmeで不足している情報も書く. コンパイル時にlibusb関係のエラーが出たので~/.bash_profileに以下を追記 (ディレクトリ名はインストールされてい…
The following code download a file from URL as FILE. file(DOWNLOAD URL FILE) ex. file(DOWNLOAD http://www.data.com/download.txt ${CMAKE_SOURCE_DIR}/download.txt)
[code lang="bash"] cmake .. -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Debug nmake [/code]
I made a repository that uses CodeSynthesis XSD with CMake. The CMakeLists.txt calls XSD and generates C++ classes so that we can avoid calling XSD from terminal, meaning the compilation is fully automatic. The CMakeLists.txt does find nec…
There are several ways for CMake installation from source. I tried to install CMake 2.8.12.2 from source using pre-installed CMake 2.8.7 but it failed. #!/bin/bash wget http://www.cmake.org/files/v2.8/cmake-2.8.12.2.tar.gz tar zxvf cmake-2…
I have been looking for how to get the name of parent directory of CMAKE_SOURCE_DIR and could find the answer today. The solution is to use get_filename_component() function with "PATH" argument. Let's say CMAKE_SOURCE_DIR is "/code/testCm…
cmake: command line interface.ccmake: terminal GUI available on unix-like systems.cmake-gui: Qt-based GUI.
If you compile source code on command prompt with CMake and Visual Studio, you should specify some options as follows: cmake -G "NMake Makefiles" . nmake -G option specifies a makefile generator.