[nfde] Fix FreeBSD build
This commit is contained in:
parent
e5a7d8c0a9
commit
020a3ec3f4
9
deps/nfde/src/CMakeLists.txt
vendored
9
deps/nfde/src/CMakeLists.txt
vendored
@ -15,8 +15,7 @@ if(nfd_PLATFORM STREQUAL PLATFORM_LINUX)
|
|||||||
# for Linux, we support GTK3 and xdg-desktop-portal
|
# for Linux, we support GTK3 and xdg-desktop-portal
|
||||||
option(NFD_PORTAL "Use xdg-desktop-portal instead of GTK" OFF)
|
option(NFD_PORTAL "Use xdg-desktop-portal instead of GTK" OFF)
|
||||||
if(NOT NFD_PORTAL)
|
if(NOT NFD_PORTAL)
|
||||||
pkg_check_modules(GTK3 REQUIRED gtk+-3.0)
|
pkg_check_modules(GTK3 REQUIRED IMPORTED_TARGET gtk+-3.0)
|
||||||
message("Using GTK version: ${GTK3_VERSION}")
|
|
||||||
list(APPEND SOURCE_FILES nfd_gtk.cpp)
|
list(APPEND SOURCE_FILES nfd_gtk.cpp)
|
||||||
else()
|
else()
|
||||||
pkg_check_modules(DBUS REQUIRED dbus-1)
|
pkg_check_modules(DBUS REQUIRED dbus-1)
|
||||||
@ -31,7 +30,7 @@ if(nfd_PLATFORM STREQUAL PLATFORM_MACOS)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Define the library
|
# Define the library
|
||||||
add_library(${TARGET_NAME} OBJECT
|
add_library(${TARGET_NAME}
|
||||||
${SOURCE_FILES})
|
${SOURCE_FILES})
|
||||||
|
|
||||||
# Allow includes from include/
|
# Allow includes from include/
|
||||||
@ -40,10 +39,8 @@ target_include_directories(${TARGET_NAME}
|
|||||||
|
|
||||||
if(nfd_PLATFORM STREQUAL PLATFORM_LINUX)
|
if(nfd_PLATFORM STREQUAL PLATFORM_LINUX)
|
||||||
if(NOT NFD_PORTAL)
|
if(NOT NFD_PORTAL)
|
||||||
target_include_directories(${TARGET_NAME}
|
|
||||||
PRIVATE ${GTK3_INCLUDE_DIRS})
|
|
||||||
target_link_libraries(${TARGET_NAME}
|
target_link_libraries(${TARGET_NAME}
|
||||||
PRIVATE ${GTK3_LIBRARIES})
|
PRIVATE PkgConfig::GTK3)
|
||||||
else()
|
else()
|
||||||
target_include_directories(${TARGET_NAME}
|
target_include_directories(${TARGET_NAME}
|
||||||
PRIVATE ${DBUS_INCLUDE_DIRS})
|
PRIVATE ${DBUS_INCLUDE_DIRS})
|
||||||
|
Loading…
Reference in New Issue
Block a user