File tree Expand file tree Collapse file tree 1 file changed +2
-17
lines changed Expand file tree Collapse file tree 1 file changed +2
-17
lines changed Original file line number Diff line number Diff line change @@ -100,29 +100,14 @@ add_library(${PROJECT_NAME}::${PROJECT_NAME} ALIAS ${PROJECT_NAME})
100
100
101
101
include (cmake/Macros.cmake )
102
102
103
- # Initialize a global empty list to hold all the source files
104
- set_property (GLOBAL PROPERTY INTERNAL_CCMATH_SOURCES "" )
105
-
106
103
# Helper function to add headers to the global source list
107
104
function (ccm_add_headers )
108
- # Retrieve the current global property value
109
- get_property (tmp GLOBAL PROPERTY INTERNAL_CCMATH_SOURCES )
110
-
111
- foreach (arg ${ARGV} )
112
- list (APPEND tmp "${arg} " )
113
- endforeach ()
114
-
115
- # Update the global property using APPEND
116
- set_property (GLOBAL PROPERTY INTERNAL_CCMATH_SOURCES "${tmp} " )
105
+ # Append all the passed arguments (headers) to the target's sources
106
+ target_sources (${PROJECT_NAME} INTERFACE "$<BUILD_INTERFACE:${ARGV} >" )
117
107
endfunction ()
118
108
119
109
add_subdirectory (include /ccmath )
120
110
121
- # Add all the headers to the target interface
122
- get_property (internal_ccmath_headers GLOBAL PROPERTY INTERNAL_CCMATH_SOURCES )
123
- target_sources (${PROJECT_NAME} INTERFACE "$<BUILD_INTERFACE:${internal_ccmath_headers} >" )
124
-
125
-
126
111
target_include_directories (${PROJECT_NAME} INTERFACE $< BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR} /include/> )
127
112
target_include_directories (${PROJECT_NAME} SYSTEM INTERFACE $< INSTALL_INTERFACE:$< INSTALL_PREFIX> /include> )
128
113
You can’t perform that action at this time.
0 commit comments