Skip to content

Commit 8f9950e

Browse files
committed
Add cmake find scripts; fix template API export declarations
1 parent 27db090 commit 8f9950e

File tree

5 files changed

+36
-2
lines changed

5 files changed

+36
-2
lines changed

cmake/FindFFMPEG.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ else (FFMPEG_LIBRARIES AND FFMPEG_INCLUDE_DIR)
5959
${FFMPEG_LIBAVCODEC}
6060
${FFMPEG_LIBAVFORMAT}
6161
${FFMPEG_LIBAVUTIL}
62+
${FFMPEG_LIBSWSCALE}
6263
)
6364

6465
endif (FFMPEG_FOUND)

cmake/FindHIDAPI.cmake

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
2+
# HIDAPI_FOUND
3+
# HIDAPI_INCLUDE_DIRS
4+
# HIDAPI_LIBRARIES
5+
6+
find_path(HIDAPI_INCLUDE_DIRS
7+
NAMES hidapi/hidapi.h
8+
/usr/include
9+
/usr/local/include
10+
/sw/include
11+
/opt/local/include
12+
DOC "The directory where hidapi/hidapi.h resides")
13+
14+
find_library(HIDAPI_LIBRARIES
15+
NAMES hidapi-hidraw hidapi-libusb
16+
PATHS
17+
/usr/lib64
18+
/usr/local/lib64
19+
/sw/lib64
20+
/opt/loca/lib64
21+
/usr/lib
22+
/usr/local/lib
23+
/sw/lib
24+
/opt/local/lib
25+
DOC "The hidapi library")
26+
27+
28+
include(FindPackageHandleStandardArgs)
29+
find_package_handle_standard_args(HIDAPI REQUIRED_VARS HIDAPI_LIBRARIES HIDAPI_INCLUDE_DIRS)
30+
31+
mark_as_advanced(HIDAPI_INCLUDE_DIR HIDAPI_LIBRARY)
32+

source/codegeneration/template_api.h.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# define ${target_id}_TEMPLATE_API
99
#else
1010
# ifndef ${target_id}_TEMPLATE_API
11-
# ifdef ${target}_EXPORTS
11+
# ifdef ${target_id}_EXPORTS
1212
/* We are building this library */
1313
# define ${target_id}_TEMPLATE_API __attribute__((visibility("default")))
1414
# else

source/codegeneration/template_msvc_api.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# define ${target_id}_TEMPLATE_API
99
#else
1010
# ifndef ${target_id}_TEMPLATE_API
11-
# ifdef ${target}_EXPORTS
11+
# ifdef ${target_id}_EXPORTS
1212
/* We are building this library */
1313
# define ${target_id}_TEMPLATE_API
1414
# else

source/fiblib/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ generate_export_header(${target}
9393
EXPORT_FILE_NAME ${export_file}
9494
EXPORT_MACRO_NAME ${export_macro}
9595
)
96+
9697
generate_template_export_header(${target}
9798
${target_id}
9899
${template_export_file}

0 commit comments

Comments
 (0)