Merge pull request #1370 from madebr/cmake/export-include-directory
cmake: add install interface include directory
This commit is contained in:
commit
9bb0db7cfb
|
@ -97,12 +97,14 @@ else()
|
||||||
add_library(openjp2_static STATIC ${OPENJPEG_SRCS})
|
add_library(openjp2_static STATIC ${OPENJPEG_SRCS})
|
||||||
set_target_properties(openjp2_static PROPERTIES OUTPUT_NAME ${OPENJPEG_LIBRARY_NAME})
|
set_target_properties(openjp2_static PROPERTIES OUTPUT_NAME ${OPENJPEG_LIBRARY_NAME})
|
||||||
set(INSTALL_LIBS ${OPENJPEG_LIBRARY_NAME} openjp2_static)
|
set(INSTALL_LIBS ${OPENJPEG_LIBRARY_NAME} openjp2_static)
|
||||||
|
target_include_directories(openjp2_static PUBLIC $<INSTALL_INTERFACE:${OPENJPEG_INSTALL_INCLUDE_DIR}>)
|
||||||
else()
|
else()
|
||||||
add_library(${OPENJPEG_LIBRARY_NAME} ${OPENJPEG_SRCS})
|
add_library(${OPENJPEG_LIBRARY_NAME} ${OPENJPEG_SRCS})
|
||||||
set(INSTALL_LIBS ${OPENJPEG_LIBRARY_NAME})
|
set(INSTALL_LIBS ${OPENJPEG_LIBRARY_NAME})
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
target_include_directories(${OPENJPEG_LIBRARY_NAME} PUBLIC $<INSTALL_INTERFACE:${OPENJPEG_INSTALL_INCLUDE_DIR}>)
|
||||||
if(UNIX)
|
if(UNIX)
|
||||||
target_link_libraries(${OPENJPEG_LIBRARY_NAME} m)
|
target_link_libraries(${OPENJPEG_LIBRARY_NAME} m)
|
||||||
endif()
|
endif()
|
||||||
|
|
Loading…
Reference in New Issue