HarbourMasters / HarbourMasters/Starship

Building on linux gives error about not providing Findtinyxml2.cmake

Open
#124 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
2.1k
Forks
140
Avg merge
14d 15h
Merged PRs (30d)
2

Description

pretty straight forward problem, the required tinyxml2 package can't be found. Creating ./cmake/modules/Findtinyxml2.cmake with the following fixes the problem:

```
find_path(TINYXML2_INCLUDE_DIR
NAMES tinyxml2.h
DOC "The Tinyxml2 include directory"
)

find_library(TINYXML2_LIBRARY
NAMES tinyxml2
DOC "The tinyxml2 library"
)

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(tinyxml2
REQUIRED_VARS TINYXML2_LIBRARY TINYXML2_INCLUDE_DIR
)

if (TINYXML2_FOUND AND NOT TARGET tinyxml2::tinyxml2)
add_library(tinyxml2::tinyxml2 STATIC IMPORTED)
set_target_properties(
tinyxml2::tinyxml2
PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${TINYXML2_INCLUDE_DIR}"
IMPORTED_LOCATION "${TINYXML2_LIBRARY}")
if (MSVC OR MINGW)
set_target_properties(
tinyxml2::tinyxml2
PROPERTIES
IMPORTED_IMPLIB "${TINYXML2_LIBRARY}"
)
endif()
endif()
`
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by inspecting ./cmake/modules and reproducing the Linux build failure involving the missing Findtinyxml2.cmake file. Add the requested package-finder module there and confirm that the Linux build can locate the tinyxml2 headers and library without the reported error.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake
Domain
build-system
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.