refactored to remove old project variable
This commit is contained in:
parent
a5c8ffaae4
commit
ef1c67b84f
|
@ -1,18 +1,16 @@
|
||||||
# An example for building and testing a shared library
|
# An example for building and testing a shared library
|
||||||
# that can also depends on another shared library
|
# that can also depends on another shared library
|
||||||
|
|
||||||
|
|
||||||
set_target_properties(wrap PROPERTIES VERSION 1.0 SOVERSION 1)
|
|
||||||
|
|
||||||
target_include_directories(camera_handler PUBLIC
|
|
||||||
${PROJECT_SOURCE_DIR}/wrap/
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}
|
|
||||||
)
|
|
||||||
|
|
||||||
add_library(wrap SHARED
|
add_library(wrap SHARED
|
||||||
wrap.c
|
wrap.c
|
||||||
)
|
)
|
||||||
|
|
||||||
|
set_target_properties(wrap PROPERTIES VERSION 1.0 SOVERSION 1)
|
||||||
|
|
||||||
|
target_include_directories(wrap PUBLIC
|
||||||
|
${PROJECT_SOURCE_DIR}/wrap/
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
|
)
|
||||||
|
|
||||||
if(UNIT_TESTING)
|
if(UNIT_TESTING)
|
||||||
|
|
||||||
|
@ -30,7 +28,7 @@ if(UNIT_TESTING)
|
||||||
list(JOIN WRAPPED_FUNCS ",--wrap=" WRAPPED_STR)
|
list(JOIN WRAPPED_FUNCS ",--wrap=" WRAPPED_STR)
|
||||||
message("WRAPPED_STR: ${WRAPPED_STR}")
|
message("WRAPPED_STR: ${WRAPPED_STR}")
|
||||||
|
|
||||||
set_target_properties(camera_handler
|
set_target_properties(wrap
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
LINK_FLAGS "-Wl,--wrap=${WRAPPED_STR}"
|
LINK_FLAGS "-Wl,--wrap=${WRAPPED_STR}"
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue