mirror of
https://github.com/Serial-Studio/Serial-Studio.git
synced 2025-01-15 05:22:53 +08:00
Only apply ar/ranlib fixes on Unix
This commit is contained in:
parent
83c922cffa
commit
a1234f14b4
@ -149,21 +149,22 @@ elseif(UNIX)
|
||||
-Wl,--gc-sections # Remove unused sections during linking
|
||||
)
|
||||
|
||||
set(CMAKE_C_COMPILER_AR "/usr/bin/ar")
|
||||
set(CMAKE_CXX_COMPILER_AR "/usr/bin/ar")
|
||||
set(CMAKE_C_COMPILER_RANLIB "/usr/bin/ranlib")
|
||||
set(CMAKE_CXX_COMPILER_RANLIB "/usr/bin/ranlib")
|
||||
|
||||
# Uncomment if needed for debugging
|
||||
# add_compile_options(-g -fsanitize=address) # Enable debugging and Address Sanitizer
|
||||
# add_link_options(-fsanitize=address) # Link with Address Sanitizer
|
||||
endif()
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# Fix linking on Linux
|
||||
# Set UNIX friendly name for app
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
if (UNIX AND NOT APPLE)
|
||||
set(PROJECT_EXECUTABLE "serial-studio")
|
||||
set(CMAKE_C_COMPILER_AR "/usr/bin/ar")
|
||||
set(CMAKE_CXX_COMPILER_AR "/usr/bin/ar")
|
||||
set(CMAKE_C_COMPILER_RANLIB "/usr/bin/ranlib")
|
||||
set(CMAKE_CXX_COMPILER_RANLIB "/usr/bin/ranlib")
|
||||
endif()
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
|
Loading…
x
Reference in New Issue
Block a user