Ruslan Baratov
Ruslan Baratov
```cmake cmake_minimum_required(VERSION 3.2) project(foo) add_library(foo foo.cpp) target_compile_definitions(foo PUBLIC FOO_FEATURE) add_library(baz_1 baz_1.cpp) target_link_libraries(baz_1 PUBLIC foo) # Case 1 add_library(baz_2 baz_2.cpp) target_link_libraries(baz_2 PRIVATE foo) # Case 2 add_executable(boo_1 boo_1.cpp) target_link_libraries(boo_1 PRIVATE baz_1)...
OpenCV example: https://github.com/opencv/opencv/blob/bf4c5bef7fa254e996f31d3e3d7f81ce63716c13/cmake/OpenCVModule.cmake#L827-L836 CMake variables: - https://cmake.org/cmake/help/latest/variable/CMAKE_COMPILE_PDB_OUTPUT_DIRECTORY.html - https://cmake.org/cmake/help/latest/variable/CMAKE_PDB_OUTPUT_DIRECTORY.html
See https://github.com/ruslo/hunter/issues/368
Take a look: - https://github.com/ruslo/sugar/blob/master/cmake/core/sugar_doxygen_generate.cmake - https://github.com/ruslo/polly/issues/91#issue-165344280 - https://majewsky.wordpress.com/2010/08/14/tip-of-the-day-cmake-and-doxygen/ Uploading: - https://github.com/miloyip/rapidjson/blob/master/travis-doxygen.sh
Always use `@ONLY` form. ```cmake # CMakeLists.txt set(A "0") configure_file(foo.cmake.in foo.cmake) ``` ```cmake # foo.cmake.in set(A "1") message("A = ${A}") # A from CMakeLists.txt will be used! ``` ```cmake #...
* http://stackoverflow.com/a/28124715/2288008 * https://gitlab.kitware.com/cmake/cmake/merge_requests/591#note_244652
http://www.mail-archive.com/[email protected]/msg55884.html