Skip to content

Commit

Permalink
Only add libatomic to gcc builds
Browse files Browse the repository at this point in the history
  • Loading branch information
Simul Piscator authored and Simul Piscator committed Sep 27, 2024
1 parent 04cd417 commit 32c1364
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -92,29 +92,29 @@ add_executable(${PROJECT_NAME}
zeroconf/hotplugnotifier.cpp
${ZEROCONF_FILES}
)

if(CMAKE_SYSTEM_NAME STREQUAL FreeBSD)
target_link_libraries(
${PROJECT_NAME}
Threads::Threads
sane
jpeg
png
${ZEROCONF_LIBS}
usb
atomic
)
set(LIBUSB usb)
else()
set(LIBUSB usb-1.0)
endif()

if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
set(LIBATOMIC atomic)
else()
set(LIBATOMIC)
endif()

target_link_libraries(
${PROJECT_NAME}
Threads::Threads
sane
jpeg
png
${ZEROCONF_LIBS}
usb-1.0
atomic
${LIBUSB}
${LIBATOMIC}
)
endif()

if(APPLE)

Expand Down

0 comments on commit 32c1364

Please sign in to comment.