cs_string icon indicating copy to clipboard operation
cs_string copied to clipboard

cmake - include header files

Open ThomasKrenn opened this issue 5 years ago • 2 comments

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

ThomasKrenn avatar Jun 30 '20 18:06 ThomasKrenn

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?

agserm avatar Jul 07 '20 02:07 agserm

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 ) `

ThomasKrenn avatar Jul 18 '20 09:07 ThomasKrenn