September 2018
Intermediate to advanced
606 pages
14h 32m
English
The install target in CMakeLists.txt is an essential component to this recipe:
install( TARGETS hello-conda DESTINATION bin )
This target makes sure that the binary is installed in ${CMAKE_INSTALL_PREFIX}/bin. The prefix variable is defined by Conda in the build step of meta.yaml:
build: number: 0 binary_relocation: true script: - cmake -H. -Bbuild_conda -G "${CMAKE_GENERATOR}" -DCMAKE_INSTALL_PREFIX=${PREFIX} # [not win] - cmake -H. -Bbuild_conda -G "%CMAKE_GENERATOR%" -DCMAKE_INSTALL_PREFIX="%LIBRARY_PREFIX%" # [win] - cmake --build build_conda --target install
The build step configures the project, sets the install prefix to ${PREFIX} (intrinsic variable set by Conda), builds, and installs the project. The motivation to call ...
Read now
Unlock full access