blob: 72fce98f6e205a1f730ec5dae2187f653e28a3ec (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
--- CMakeLists.txt.orig 2021-02-01 18:41:51 UTC
+++ CMakeLists.txt
@@ -67,6 +67,13 @@ add_executable(${PROJECT_NAME}
zeroconf/hotplugnotifier.cpp
${ZEROCONF_FILES}
)
+
+if(CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
+ set(USB_LIBRARY usb)
+else()
+ set(USB_LIBRARY usb-1.0)
+endif()
+
target_link_libraries(
${PROJECT_NAME}
Threads::Threads
@@ -74,7 +79,7 @@ target_link_libraries(
jpeg
png
${ZEROCONF_LIBS}
- usb-1.0
+ ${USB_LIBRARY}
)
if(APPLE)
@@ -102,8 +107,31 @@ install(CODE "
endif()
")
+elseif(CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
+set(STAGEDIR "%%STAGEDIR%%")
+
+install(TARGETS ${PROJECT_NAME}
+ RUNTIME DESTINATION sbin
+)
+
+install(CODE "
+ if(NOT EXISTS ${STAGEDIR}/usr/local/etc/airsane/ignore.conf)
+ file(INSTALL ${CMAKE_SOURCE_DIR}/etc/ignore.conf DESTINATION /usr/local/etc/airsane)
+ endif()
+")
+install(CODE "
+ if(NOT EXISTS ${STAGEDIR}/usr/local/etc/airsane/options.conf)
+ file(INSTALL ${CMAKE_SOURCE_DIR}/etc/options.conf DESTINATION /usr/local/etc/airsane)
+ endif()
+")
+install(CODE "
+ if(NOT EXISTS ${STAGEDIR}/usr/local/etc/airsane/Gnome-scanner.png)
+ file(INSTALL ${CMAKE_SOURCE_DIR}/etc/Gnome-scanner.png DESTINATION /usr/local/etc/airsane)
+ endif()
+")
+
else()
install(TARGETS ${PROJECT_NAME}
RUNTIME DESTINATION bin
|