This repository contains implementation for downloading few external project's source at CMake's configure step rather than as part of the main build. These external project's are added using ExternalProject_Add(...)
, which after downloading, configure's, build and installs them.
At the time of creation of this project I am new to cmake
. This project is meant as place holder for my learnings and observations which might help others by sharing it here.
Any improvements or corrections in the cmake
code are welcome.
This is header only library.
No packaging or export provided.
No version check of v2.0.08.68
. Installation of headers.
This is header only library.
Packaging using pkgconfig.pc.in
.
Version check of 3.0.0
. Installation of header and cmake-files.
File include/cxxopts.hpp
moved to include/
cxxopts
/cxxopts.hpp
.
find_package(cxxopts ...)
works as expected.
This is a STATIC library.
Packaging using export(PACKAGE cppproperties)
.
Version check of 2.0.01.0
. Installation of headers, binary-lib and cmake-files.
This test-lib is integrated by calling add_subdirectory(...)
.
mkdir ./rootbuild
cd ./rootbuild
cmake .. -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON
cmake --build . -v
ctest
./cmakeExampleExternalProjectAdd --propfilename=../property/test1.txt
All the 3rd-Party-libs are downloaded, built and installed in ${CMAKE_SOURCE_DIRECTORY}/libs3rdParty
.
Check out Crascit-DownloadProject for better understanding of using ExternalProject_Add(googletest ...)
cmake, ExternalProject_Add, add_library, add_subdirectory, find_package.
Integration of rapicsv, cxxopts, cppproperties, googletest.