virtualsquare / virtualsquare/s2argv-execs
build error (and suggested fix): add ARCHIVE DESTINATION for static libs
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 3
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
In my environment I hit build errors with the following two lines of CMakeLists.txt;
https://github.com/virtualsquare/s2argv-execs/blob/40f86a21ff242cac17303ea93169fe87812638ee/CMakeLists.txt#L34-L35
For those two targets (the only ones declared as static libraries), it seems cmake needed ARCHIVE DESTINATION, in addition to (or instead of) LIBRARY DESTINATION.
The following local change allows the build to complete successfully;
install(TARGETS execs LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
install(TARGETS execs-embedded LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
-install(TARGETS execs_static LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
-install(TARGETS execs-embedded_static LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
+install(TARGETS execs_static LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
+install(TARGETS execs-embedded_static LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
install(FILES execs.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
Contributor guide
No contributing guide indexed for this repository
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.
Research direction
Start with CMakeLists.txt lines 34-35, which install the two static-library targets execs_static and execs-embedded_static. Check the CMake install behavior for static libraries and apply the proposed ARCHIVE DESTINATION change. Done means the project configures, builds, and installs successfully in the affected environment.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, cmake
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100