Skip to content

Commit

Permalink
Link filesystem library when building with older gcc/clang
Browse files Browse the repository at this point in the history
  • Loading branch information
houmain committed Oct 21, 2022
1 parent f8b0b02 commit a2c0e7b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,16 @@ if(NOT WIN32)
add_compile_definitions(ENABLE_WLROOTS)
endif()

if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "9.1")
target_link_libraries(keymapper stdc++fs)
endif()
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "9.0")
target_link_libraries(keymapper c++fs)
endif()
endif()

target_link_libraries(keymapperd usb-1.0 udev)
else() # WIN32
string(REPLACE "." "," FILE_VERSION "${VERSION}")
Expand Down

0 comments on commit a2c0e7b

Please sign in to comment.