@Gitter :gitter.im/cnruby
Code ID: basic_126
Code Name: Hello, Multiple Versions!
- About The Project
- Demonstrate Building Multiple Versions
- The
CMake
Codes of Project - The Structure of Project
- Final Summary
- References
# For MacOS
brew install sqlite
#<!-- markdown-exec(cmd:cat ../get_project.sh) -->#!/bin/bash
# ./get_project.sh <PROJECT_ID>
# ./get_project.sh basic_126
#
PROJECT_HOME=$HOME/Documents/dev/cpp-ws/$1
git clone https://github.com/cnruby/w3h1_cmake.git $PROJECT_HOME
cd $PROJECT_HOME && git checkout $1
code $PROJECT_HOME
#<!-- /markdown-exec -->
#<!-- markdown-exec(cmd:cat src/CMakeLists.txt) -->#
add_executable( brew_main_126 main_brew.cxx )
target_include_directories(
brew_main_126 PRIVATE ${_PROJECT_CONFIG_DIR}
)
target_link_libraries(
brew_main_126 PRIVATE Sqlite3Brew
)
add_executable( os_main_126 main_os.cxx )
target_include_directories(
os_main_126 PRIVATE ${_PROJECT_CONFIG_DIR}
)
target_link_libraries(
os_main_126 PRIVATE Sqlite3OS
)
#<!-- /markdown-exec -->
#<!-- markdown-exec(cmd:cat cmake/GetSQLite3.cmake) -->#
# Brew Install SQLite3
set(_BREW_SQLITE_INCLUDE_DIR /usr/local/opt/sqlite3/include)
set(_BREW_SQLITE_LIBRARY /usr/local/opt/sqlite3/lib/libsqlite3.dylib)
# MacOS Default SQLite3
set(_OS_SQLITE_INCLUDE_DIR /usr/include)
set(_OS_SQLITE_LIBRARY /usr/lib/libsqlite3.dylib)
add_library(Sqlite3Brew SHARED IMPORTED)
set_target_properties(Sqlite3Brew
PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES ${_BREW_SQLITE_INCLUDE_DIR}
IMPORTED_LOCATION ${_BREW_SQLITE_LIBRARY}
)
add_library(Sqlite3OS SHARED IMPORTED)
set_target_properties(Sqlite3OS
PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES ${_OS_SQLITE_INCLUDE_DIR}
IMPORTED_LOCATION ${_OS_SQLITE_LIBRARY}
)
#<!-- /markdown-exec -->
#<!-- markdown-exec(cmd:cat docs/output/tree.txt) -->#
.
├── cmake
│ ├── CMakeLists.txt
│ ├── config.h.in
│ ├── GetSQLite3.cmake
│ └── Initialize.cmake
├── CMakeLists.txt
├── config
│ └── config.hxx
└── src
├── CMakeLists.txt
├── main_brew.cxx
└── main_os.cxx
#<!-- /markdown-exec -->
@Gitter: gitter.im/cnruby
@Github: github.com/cnruby
@Twitter: twitter.com/cnruby
@Blogspot: cnruby.blogspot.com
- https://cmake.org/cmake/help/latest/command/configure_file.html
- https://gitlab.kitware.com/cmake/community/-/wikis/doc/tutorials/How-to-create-a-ProjectConfig.cmake-file
- https://riptutorial.com/cmake/example/26652/generate-a-cplusplus-configure-file-with-cmake
- https://stackoverflow.com/questions/48580399/how-to-ensure-a-generated-config-h-file-is-in-the-include-path
- https://github.com/bast/cmake-example/tree/master/cmake
- https://cmake.org/pipermail/cmake/2006-May/009049.html
- https://discourse.brew.sh/t/failed-to-set-locale-category-lc-numeric-to-en-ru/5092/5
- https://raw.githubusercontent.com/git/git/master/po/de.po
- https://raw.githubusercontent.com/git/git/master/po/zh_CN.po
- https://www.boost.org/doc/libs/1_57_0/libs/locale/doc/html/messages_formatting.html
- https://cmake.org/cmake/help/v3.0/variable/ENV.html
- https://cmake.org/cmake/help/latest/module/FindIntl.html
- https://stackoverflow.com/questions/1003360/complete-c-i18n-gettext-hello-world-example/1033337
- https://fedoraproject.org/wiki/How_to_do_I18N_through_gettext
- https://stackoverflow.com/questions/1003360/complete-c-i18n-gettext-hello-world-example
- https://stackoverflow.com/questions/21370363/link-error-installing-rcpp-library-not-found-for-lintl
- https://ubuntuforums.org/showthread.php?t=108879
- https://github.com/neovim/neovim/blob/master/src/nvim/po/de.po
- https://progmar.net.pl/en/knowledge-base/gettext
- https://stackoverflow.com/questions/11789615/how-to-support-multiple-language-in-a-linux-c-c-program
- https://stackoverflow.com/questions/11370684/what-is-libintl-h-and-where-can-i-get-it
- https://nkumar.fedorapeople.org/helloi18n/helloworldintld/
- https://nkumar.fedorapeople.org/helloi18n/helloworld/
- https://stackoverflow.com/questions/31356199/multiple-make-targets-in-the-same-cmake-project
- https://stackoverflow.com/questions/47553569/how-can-i-build-multiple-targets-using-cmake-build?rq=1
- https://cmake.org/pipermail/cmake/2013-March/054016.html