lemire / streamvbyte

Fast integer compression in C using the StreamVByte codec
Apache License 2.0
376 stars 37 forks source link

Fix target_include_directories path #48

Closed victor1234 closed 1 year ago

victor1234 commented 1 year ago

Summary

Description

 target_include_directories(streamvbyte  PUBLIC ${PROJECT_SOURCE_DIR}/include)

Will not work after exporting the target and will make difficult to use streamvbyte as a cmake dependency Replced by

target_include_directories(
    streamvbyte
    PUBLIC
        $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
        $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/include>
)
lemire commented 1 year ago

Merging when CI turns green.

victor1234 commented 1 year ago

I am using your code in my project now. And I need to change (refactor) cmake, for example, make one library instead of static and shared (which is easy to choose by using BUILD_SHARED_LIBS) would you approve such PR?

lemire commented 1 year ago

would you approve such PR?

Absolutely.

lemire commented 1 year ago

Merged.