File tree 5 files changed +109
-94
lines changed
5 files changed +109
-94
lines changed Original file line number Diff line number Diff line change @@ -72,9 +72,9 @@ set(etripator_HDR
72
72
73
73
add_library (etripator STATIC ${etripator_SRC} ${etripator_HDR} )
74
74
set_target_properties (etripator PROPERTIES C_STANDARD 11)
75
- target_include_directories (etripator PUBLIC ${JANSSON_INCLUDE_DIRS} ${ EXTRA_INCLUDE} externals)
75
+ target_include_directories (etripator PUBLIC ${EXTRA_INCLUDE} externals)
76
76
target_compile_definitions (etripator PRIVATE _POSIX_C_SOURCE)
77
- target_link_libraries (etripator PUBLIC ${JANSSON_LIBRARIES} cwalk)
77
+ target_link_libraries (etripator PUBLIC jansson cwalk)
78
78
#[[
79
79
add_executable(etripator_cli cli/etripator.c cli/options.c)
80
80
set_target_properties(etripator_cli
Original file line number Diff line number Diff line change @@ -26,34 +26,43 @@ else (JANSSON_LIBRARIES AND JANSSON_INCLUDE_DIRS)
26
26
/sw/include
27
27
)
28
28
29
- find_library (JANSSON_LIBRARY
30
- NAMES
31
- jansson
32
- PATHS
33
- /usr/lib
34
- /usr/local/lib
35
- /opt/local/lib
36
- /sw/lib
29
+ find_library (JANSSON_LIBRARY
30
+ NAMES
31
+ jansson
32
+ PATHS
33
+ /usr/lib
34
+ /usr/local/lib
35
+ /opt/local/lib
36
+ /sw/lib
37
37
)
38
38
39
- set (JANSSON_INCLUDE_DIRS
40
- ${JANSSON_INCLUDE_DIR}
39
+ set (JANSSON_INCLUDE_DIRS
40
+ ${JANSSON_INCLUDE_DIR}
41
41
)
42
42
43
- if (JANSSON_LIBRARY)
44
- set (JANSSON_LIBRARIES
45
- ${JANSSON_LIBRARIES}
46
- ${JANSSON_LIBRARY}
43
+ if (JANSSON_LIBRARY)
44
+ set (JANSSON_LIBRARIES
45
+ ${JANSSON_LIBRARIES}
46
+ ${JANSSON_LIBRARY}
47
47
)
48
- endif (JANSSON_LIBRARY)
48
+ endif (JANSSON_LIBRARY)
49
+ endif (JANSSON_LIBRARIES AND JANSSON_INCLUDE_DIRS)
49
50
50
- include (FindPackageHandleStandardArgs)
51
- find_package_handle_standard_args(Jansson DEFAULT_MSG
52
- JANSSON_LIBRARIES JANSSON_INCLUDE_DIRS)
51
+ include (FindPackageHandleStandardArgs)
52
+ find_package_handle_standard_args(Jansson DEFAULT_MSG
53
+ JANSSON_LIBRARIES JANSSON_INCLUDE_DIRS)
53
54
54
- # show the JANSSON_INCLUDE_DIRS and JANSSON_LIBRARIES variables only in the advanced view
55
- mark_as_advanced (JANSSON_INCLUDE_DIRS JANSSON_LIBRARIES)
55
+ if (JANSSON_FOUND)
56
+ add_library (jansson UNKNOWN IMPORTED )
57
+ set_target_properties (jansson
58
+ PROPERTIES
59
+ IMPORTED_LOCATION "${JANSSON_LIBRARIES} "
60
+ INTERFACE_INCLUDE_DIRECTORIES "${JANSSON_INCLUDE_DIRS} "
61
+ )
62
+ endif ()
63
+
64
+ # show the JANSSON_INCLUDE_DIRS and JANSSON_LIBRARIES variables only in the advanced view
65
+ mark_as_advanced (JANSSON_INCLUDE_DIRS JANSSON_LIBRARIES)
56
66
57
- endif (JANSSON_LIBRARIES AND JANSSON_INCLUDE_DIRS)
58
67
59
68
You can’t perform that action at this time.
0 commit comments