Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[compilation] Corrected path to stlink/chips subdirectory #1279

Merged
merged 3 commits into from
Dec 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,17 @@ include(${CMAKE_MODULE_PATH}/get_version.cmake) # Determine project version

include(GNUInstallDirs) # Define GNU standard installation directories

# Define install directory /usr/share
set(CMAKE_INSTALL_SHAREDIR /usr/share/)
# Define install directory /usr/local/share [not /usr/share on MacOS]
cmake_host_system_information(RESULT OS_NAME QUERY OS_NAME)
message(STATUS "Checking for OS_NAME: ${OS_NAME}")

if (OS_NAME STREQUAL "macOS")
message(STATUS "set(CMAKE_INSTALL_SHAREDIR /usr/local/share)")
set(CMAKE_INSTALL_SHAREDIR /usr/local/share/)
else ()
message(STATUS "set(CMAKE_INSTALL_SHAREDIR /usr/share)")
set(CMAKE_INSTALL_SHAREDIR /usr/share/)
endif ()

## Set C build flags
if (NOT MSVC)
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ We recommend to install `stlink-tools` from the package repository of the used d

- RedHat/CentOS 8: Users can install from [EPEL repository](https://src.fedoraproject.org/rpms/stlink/branch/epel8)
- FreeBSD: Users can install from [freshports](https://www.freshports.org/devel/stlink)
- MacOS: Users can open a terminal window and then follow the same procedure as for installing on Linux

## Installation from source (advanced users)

Expand All @@ -103,4 +104,4 @@ Please also refer to our [Contribution Guidelines](CONTRIBUTING.md).

*I hope it's not to out of topic, but I've been so frustrated with AVR related things on OpenBSD, the fact that stlink built out of the box without needing to touch anything was so relieving. Literally made my whole weekend better!
I take it's thanks to @Crest and also to the stlink-org team (@Nightwalker-87 and @xor-gate it seems) to have made a software that's not unfriendly to the "fringe" OSes.
Thank you <3"* - nbonfils, 11.12.2021
Thank you <3"* - nbonfils, 11.12.2021