I'm trying to import an external project from an existing project that uses CMakeFiles. For this, I'm trying to add a static library ".a" with the files that I need for imports.
My CMakeFiles.txt:
cmake_minimum_required(VERSION 2.8.9)
project(TEST)
set(CMAKE_BUILD_TYPE Release)
#Bring the headers, such as Student.h into the project
include_directories(include)
#However, the file(GLOB...) allows for wildcard additions:
file(GLOB SOURCES "src/examples/equality_prob/*.cpp" "src/examples/equality_prob/common/*.cpp")
#Generate the static library from the sources
add_library(testEquality STATIC ${SOURCES})
Until there I think that I'm in the right way. But in the file(GLOB SOURCES , I want to add all the files *.cpp , *.h and so on, of a folder that has other folders inside them.
I can do this in Makefiles with something like this:
$(shell find ${SRC}/examples -type f -name '*.o')
but how can I make this in CMakeFiles?