Skip to content

Commit

Permalink
Merge pull request #1279 from weiminshen99/develop
Browse files Browse the repository at this point in the history
[compilation] Corrected path to stlink/chips subdirectory
  • Loading branch information
Nightwalker-87 committed Dec 18, 2022
2 parents f93adb9 + 44ec93d commit 879e769
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
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

0 comments on commit 879e769

Please sign in to comment.