copperspice / cs_string

Header-only library providing unicode aware string support for C++
https://www.copperspice.com/
Other
105 stars 12 forks source link

cmake - include header files #8

Open ThomasKrenn opened 4 years ago

ThomasKrenn commented 4 years ago

For users with an IDE (CLion or MSVC) it is helpful to include the header to the project.

agserm commented 4 years ago

I'm not sure which header you refer to and what you mean by "include the header to the project." Can you give us a bit more information or an example?

ThomasKrenn commented 4 years ago

In all CPP IDE's I know it is customary to include the header files to the project/solutions. In string.cmake simply include the header files to target_sources.

` set(CS_STRING_INCLUDE ${CMAKE_CURRENT_SOURCE_DIR}/src/cs_char.h ${CMAKE_CURRENT_SOURCE_DIR}/src/cs_encoding.h ${CMAKE_CURRENT_SOURCE_DIR}/src/cs_string.h ${CMAKE_CURRENT_SOURCE_DIR}/src/cs_string_iterator.h ${CMAKE_CURRENT_SOURCE_DIR}/src/cs_string_view.h )

target_sources(CsString PRIVATE

${CS_STRING_INCLUDE}

${CMAKE_CURRENT_SOURCE_DIR}/src/cs_string.cpp ) `