cmake: add install interface include directory
This commit is contained in:
parent
0afbdcf3e6
commit
5c2053950e
|
@ -97,12 +97,14 @@ else()
|
|||
add_library(openjp2_static STATIC ${OPENJPEG_SRCS})
|
||||
set_target_properties(openjp2_static PROPERTIES OUTPUT_NAME ${OPENJPEG_LIBRARY_NAME})
|
||||
set(INSTALL_LIBS ${OPENJPEG_LIBRARY_NAME} openjp2_static)
|
||||
target_include_directories(openjp2_static PUBLIC $<INSTALL_INTERFACE:${OPENJPEG_INSTALL_INCLUDE_DIR}>)
|
||||
else()
|
||||
add_library(${OPENJPEG_LIBRARY_NAME} ${OPENJPEG_SRCS})
|
||||
set(INSTALL_LIBS ${OPENJPEG_LIBRARY_NAME})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
target_include_directories(${OPENJPEG_LIBRARY_NAME} PUBLIC $<INSTALL_INTERFACE:${OPENJPEG_INSTALL_INCLUDE_DIR}>)
|
||||
if(UNIX)
|
||||
target_link_libraries(${OPENJPEG_LIBRARY_NAME} m)
|
||||
endif()
|
||||
|
|
Loading…
Reference in New Issue