Skip to content

Commit 999710d

Browse files
committed
fix(build): fix source_group error in CMakeLists.txt
Moved adding ${EXPORT_HEADER} to PUBLIC_HEADERS after calling source_group.
1 parent aeeb61b commit 999710d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,6 @@ set(EXPORT_HEADER "${PROJECT_BINARY_DIR}/include/${PNAME_LOWER}/export.hpp")
8181
generate_export_header("${PNAME_LOWER}" EXPORT_FILE_NAME "${EXPORT_HEADER}")
8282

8383
set(PUBLIC_HEADERS
84-
"${EXPORT_HEADER}"
8584
"include/${PNAME_LOWER}/capitalize.hpp"
8685
"include/${PNAME_LOWER}/center.hpp"
8786
"include/${PNAME_LOWER}/const.hpp"
@@ -129,8 +128,9 @@ set(SOURCES
129128
"src/translate.cpp"
130129
)
131130

131+
list(APPEND PUBLIC_HEADERS "${EXPORT_HEADER}")
132132
source_group(TREE "${PROJECT_SOURCE_DIR}" FILES ${SOURCES})
133-
target_sources("${PNAME_LOWER}" PRIVATE ${SOURCES})
133+
target_sources("${PNAME_LOWER}" PRIVATE "${EXPORT_HEADER}" ${SOURCES})
134134

135135
set_target_properties("${PNAME_LOWER}" PROPERTIES
136136
PUBLIC_HEADER

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ include(FetchContent)
5555
FetchContent_Declare(
5656
StringPy
5757
GIT_REPOSITORY https://github.com/hun1er/stringpy.git
58-
GIT_TAG v1.0.0
58+
GIT_TAG v1.0.1
5959
)
6060
6161
FetchContent_MakeAvailable(StringPy)

0 commit comments

Comments
 (0)