File tree 2 files changed +11
-3
lines changed
2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change 1
1
find_path (LZ4_INCLUDE_DIRS NAMES lz4.h)
2
2
find_library (LZ4_LIBRARIES NAMES lz4)
3
3
4
+ if (LZ4_INCLUDE_DIRS AND EXISTS "${LZ4_INCLUDE_DIRS} /lz4.h" )
5
+ file (STRINGS "${LZ4_INCLUDE_DIRS} /lz4.h" LZ4_H REGEX "^#define LZ4_VERSION_[MR]" )
6
+ string (REGEX REPLACE "LZ4_VERSION" "" LZ4_H "${LZ4_H} " )
7
+ string (REGEX MATCHALL "[0-9]+" LZ4_H "${LZ4_H} " )
8
+ string (REGEX REPLACE ";" "." LZ4_VERSION_STRING "${LZ4_H} " )
9
+ endif ()
10
+
4
11
include (FindPackageHandleStandardArgs)
5
12
FIND_PACKAGE_HANDLE_STANDARD_ARGS(
6
- LZ4 DEFAULT_MSG
7
- LZ4_LIBRARIES LZ4_INCLUDE_DIRS)
13
+ LZ4
14
+ REQUIRED_VARS LZ4_LIBRARIES LZ4_INCLUDE_DIRS
15
+ VERSION_VAR LZ4_VERSION_STRING)
8
16
9
17
mark_as_advanced (LZ4_INCLUDE_DIRS LZ4_LIBRARIES)
Original file line number Diff line number Diff line change 1
- FIND_PACKAGE (LZ4)
1
+ FIND_PACKAGE (LZ4 1.6 )
2
2
3
3
IF (LZ4_FOUND)
4
4
GET_PROPERTY (dirs DIRECTORY PROPERTY INCLUDE_DIRECTORIES )
You can’t perform that action at this time.
0 commit comments