-
Notifications
You must be signed in to change notification settings - Fork 67
Building stlab libraries with CLion
Foster Brereton edited this page Jul 25, 2017
·
1 revision
This file assumes CLion is properly installed on your machine, and that you have stlab
cloned to ~/git/github/stlab
.
- In a Terminal, run the following to download and install the conan dependencies, and save
conanbuildinfo.cmake
to thebuild
directory:(This set of steps is identical to the Xcode setup script, exceptcd ~/git/github/stlab # Your path may vary mkdir -p build cd build conan install .. --build=missing -s build_type=Debug cd ..
cmake
is not executed here - CLion will handle that for you.) - Open CLion, select "Open Project", and open
stlab
's top-levelCMakeLists.txt
file: - Two things need to change to get
stlab
to build, which will solve next:- The build directory is
cmake-build-debug
, notbuild
- The
stlab_testing=ON
setting needs to be added to the CMake invocation
- The build directory is
- Make sure you can see the CMake panel at the bottom of the IDE window. If you do not, you may have to select it from View → Tool Windows → CMake:
- In the CMake panel, click the gear icon and select "CMake Settings"
- In the ensuing Preferences Window, change:
- Add "-Dstlab_testing=ON" to the "CMake options" field
- Set the Generation Path to "build"
- You may have to close and reopen the
stlab
project in the IDE. You may also have to Reload the CMake project from within the CMake Panel: - Building and Running should now be available in the
Run
menu.
(You can safely delete the cmake-build-debug
directory if it exists.