Skip to content

Commit 2d2de53

Browse files
authored
Fix CMake scripts for FreeBSD (#550)
This fixes linking of the XCB library on FreeBSD.
1 parent 0d10c6e commit 2d2de53

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/CMakeLists.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,12 @@ target_link_libraries(${library_name} PUBLIC Qt${QT_VERSION_MAJOR}::Core
8585
Qt${QT_VERSION_MAJOR}::Gui
8686
Qt${QT_VERSION_MAJOR}::Widgets)
8787
if (UNIX AND NOT APPLE)
88-
target_link_libraries(${library_name} PUBLIC xcb)
88+
if (${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
89+
find_package(X11 REQUIRED)
90+
target_link_libraries(${library_name} PUBLIC X11::xcb)
91+
else()
92+
target_link_libraries(${library_name} PUBLIC xcb)
93+
endif()
8994
endif()
9095
set_target_properties(${library_name} PROPERTIES
9196
AUTOMOC ON

0 commit comments

Comments
 (0)