Hi,
I tried to follow some examples and wrote some cmake files to build my
code. But cmake is complaining that it cannot find a source file. Here is the
code structure:
Toplevel
|----- CMakeLists.txt
|----- src --------|------CMakeLists.txt
| |------common---------------|-------CMakeLists.txt
| |------dir1-----| |-------
src1.h
| |-----CMakeLists.txt
|----bin |-----src2.c
|-----src3.c
Here is the CMakeLists.txt in toplevel:
project(proj)
add_subdirectory(src)
Here is the CMakeLists.txt in src:
project(proj)
add_subdirectory(common)
add_subdirectory(dir1)
include_directories(common)
set(src_files src1.h src2.c src3.c)
add_executable(exec ${src_files})
CMakeLists.txt in common and dir1 are empty.
When I ran "cmake .." in bin, cmake complained that it could not find
source file src1.h in add_executable. What is wrong here?
Thanks,
Lei
--
Powered by www.kitware.com
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Kitware offers various services to support the CMake community. For more
information on each offering, please visit:
CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake