@Gitter :gitter.im/cnruby
Code ID: basic_130
Code Name: Hello, Multiple Projects!
#<!-- markdown-exec(cmd:cat docs/output/tree.txt) -->#
.
├── CMakeLists.txt
├── Lib
│ ├── CMakeLists.txt
│ ├── impl
│ │ └── hello.cxx
│ └── include
│ └── hello.hxx
└── Main
│ ...
├── CMakeLists.txt
└── src
├── CMakeLists.txt
└── main.cxx
#<!-- /markdown-exec -->
#<!-- markdown-exec(cmd:cat ./Main/CMakeLists.txt) -->#
cmake_minimum_required(VERSION 3.3)
project(cxx_main VERSION 0.1.0 LANGUAGES CXX DESCRIPTION "Hello, Multiple-Project's Main!" )
include("cmake/Initialize.cmake")
add_subdirectory(cmake)
include_directories(${PROJECT_CONIFG_DIR})
if(TARGET hello_lib)
message(STATUS "The Library 'hello_lib' exists!")
# Project "basic_113"
include("src/integrate.cmake")
else()
message(STATUS "The Library 'hello_lib' exists not.")
# Project "basic_125"
include("src/develop.cmake")
endif()
#<!-- /markdown-exec -->
#<!-- markdown-exec(cmd:cat ./Main/src/integrate.cmake) -->#
add_executable(main_130 src/main.cxx)
# Method 1
target_link_libraries(main_130 hello_lib)
# Method 2
#add_library(Any::alias ALIAS hello_lib)
#target_link_libraries(main_130 Any::alias)
#<!-- /markdown-exec -->
#<!-- markdown-exec(cmd:cat ./Main/CMakeLists.txt) -->#
cmake_minimum_required(VERSION 3.3)
project(cxx_main VERSION 0.1.0 LANGUAGES CXX DESCRIPTION "Hello, Multiple-Project's Main!" )
include("cmake/Initialize.cmake")
add_subdirectory(cmake)
include_directories(${PROJECT_CONIFG_DIR})
if(TARGET hello_lib)
message(STATUS "The Library 'hello_lib' exists!")
# Project "basic_113"
include("src/integrate.cmake")
else()
message(STATUS "The Library 'hello_lib' exists not.")
# Project "basic_125"
include("src/develop.cmake")
endif()
#<!-- /markdown-exec -->
#<!-- markdown-exec(cmd:cat ./Main/src/develop.cmake) -->#
add_executable(
main_130 src/main.cxx
)
target_include_directories(
main_130 PRIVATE
${LIB_INCLUDE_DIR}
)
target_link_libraries(
main_130
${LIB_LIB_DIR}/libhello_lib.a
)
#<!-- /markdown-exec -->
@Gitter: gitter.im/cnruby
@Github: github.com/cnruby
@Twitter: twitter.com/cnruby
@Blogspot: cnruby.blogspot.com
- https://github.com/cpp-pm/hunter/releases
- https://hunter.readthedocs.io/en/latest/packages.html
- https://hunter.readthedocs.io/en/latest/creating-new/create/cmake.html
- https://meetingcpp.com/mcpp/slides/2018/lightningtalk_hunter.pdf
- https://geokon-gh.github.io/hunterintro.html
- https://readthedocs.org/projects/hunter/downloads/pdf/latest/
- https://github.com/cpp-pm/gate
- https://discourse.cmake.org/t/hunter-c-c-cmake-package-manager-gained-an-easy-setup-mechanism-via-cmakes-fetchcontent/145
- https://craffael.github.io/lehrfempp/getting_started.html
- https://stackoverflow.com/questions/35689501/cmakes-execute-process-and-arbitrary-shell-scripts
- https://unix.stackexchange.com/questions/42797/openssl-dgst-sha1-producing-an-extraneous-stdin-prefix-and-trailing-new
- https://preshing.com/20170522/learn-cmakes-scripting-language-in-15-minutes/
- https://www.youtube.com/watch?v=wrCObV3qlhM
- https://readthedocs.org/projects/hunter/downloads/pdf/latest/
- https://github.com/hunter-packages
- https://www.youtube.com/watch?v=O2_N8OzPGWQ
- https://gitlab.lrz.de/ls-mayer-public/hunter/-/tree/042a420e7588ef6a662ccbc49881547f520fb594/examples
- https://github.com/cpp-pm/hunter/tree/master/cmake/projects/
- https://github.com/cpp-pm/hunter/blob/master/cmake/projects/sqlite3/hunter.cmake
- https://gitter.im/cpp-pm/community?at=5e1d99e7cb2aaa2d78377ca2
- https://hunter.readthedocs.io/en/latest/packages/pkg/Boost.html
git clone https://github.com/cnruby/w3h1_cmake.git basic_130
cd basic_130
git checkout basic_130
code .