Skip to content

Commit 525a775

Browse files
committed
CMake: fix add_dir macros (now add *.c files)
1 parent 3a891e9 commit 525a775

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

cmake/utils.cmake

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
macro(add_dir DIRS)
22
foreach(dir ${DIRS})
3-
message( "adding ${dir} to ${PROJECT_NAME}")
4-
include_directories (${dir} )
5-
file( GLOB ${dir}__INCLUDES_H ${dir} ${dir}/*.h)
6-
file( GLOB ${dir}__INCLUDES_HPP ${dir} ${dir}/*.hpp)
7-
list( APPEND ${PROJECT_NAME}__INCLUDES ${${dir}__INCLUDES_H} ${${dir}__INCLUDES_HPP} )
8-
file( GLOB ${dir}__SOURCES ${dir} ${dir}/*.cpp)
9-
list( APPEND ${PROJECT_NAME}__SOURCES ${${dir}__SOURCES} )
3+
message( "adding ${dir} to ${PROJECT_NAME}")
4+
include_directories (${dir} )
5+
file( GLOB ${dir}__INCLUDES_H ${dir} ${dir}/*.h)
6+
file( GLOB ${dir}__INCLUDES_HPP ${dir} ${dir}/*.hpp)
7+
list( APPEND ${PROJECT_NAME}__INCLUDES ${${dir}__INCLUDES_H} ${${dir}__INCLUDES_HPP} )
8+
file( GLOB ${dir}__SOURCES_CPP ${dir} ${dir}/*.cpp)
9+
file( GLOB ${dir}__SOURCES_C ${dir} ${dir}/*.c)
10+
list( APPEND ${PROJECT_NAME}__SOURCES ${${dir}__SOURCES_C} ${${dir}__SOURCES_CPP} )
1011
endforeach()
1112
endmacro()

0 commit comments

Comments
 (0)