[cmake] `add_subdirectory` support
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- cmake, cpp
- Domain
- build-system
Research direction
Start by reading the repository's CMakeLists.txt and compare its current structure with the proposed add_subdirectory setup in this issue. Clarify which inclusion and linking behavior the project should support; done means the intended CMake integration works for a consuming project.
Written by the indexing model from the issue text.
Description
Thank you library creators for protecting peoples minds from Microsoft C interfaces!
But why every 3rd library with CMakeLists.txt can't setup a sane project inclusion!?
It is was not hard to create one for this library.
# Setup: odbc-cpp-wrapper (C++ Wrapper for ODBC) #
if(MINGW)
set(ODBC_INCLUDE_DIR "" CACHE PATH "[MinGW] prevent '../Windows Kits/..' inclusion from VS dev env")
endif()
find_package(ODBC REQUIRED)
file(GLOB_RECURSE ODBCCPP_SOURCE_FILES_ "${CMAKE_SOURCE_DIR}/deps/odbc-cpp-wrapper/src/*.cpp")
add_library (odbccpp STATIC ${ODBCCPP_SOURCE_FILES_})
target_include_directories(odbccpp SYSTEM PUBLIC "${CMAKE_SOURCE_DIR}/deps/odbc-cpp-wrapper/src")
target_compile_definitions(odbccpp PUBLIC ODBC_STATIC)
target_link_libraries (odbccpp PUBLIC ODBC::ODBC)
set_target_properties (odbccpp PROPERTIES CXX_STANDARD 11 CXX_STANDARD_REQUIRED ON)
target_link_libraries(${PROJECT_NAME} odbccpp)
Should I try to contribute to project's CMakeLists.txt?
- Dominant language
- C++
- Stars
- 53
- Forks
- 30
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from SAP/odbc-cpp-wrapper
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
SAP/odbc-cpp-wrapper#56 · 1 comment ·
-
Difficulty 3/5 1-2 days Newbie friendliness 25/100
SAP/odbc-cpp-wrapper#3 · 2 comments ·
All issues in SAP/odbc-cpp-wrapper
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
good first issue
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
ros2/message_filters#338 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
subsurface/subsurface#4984 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
flutter-webrtc/flutter-webrtc#2206 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
google-ai-edge/LiteRT-LM#3739 ·