include header files in cmake -


i have cmakelist.txt file has 1 liner include(startevn.cmake) in startevn.cmake have,

project(startevn) set(headers     startup.h ) set(sources   system-init.cpp ) new_library(startevn ${sources} ${headers}) 

now have move startup different directory. after doing added following line "startevn.cmake",

include_directories("/new_folder_location/sub_folder") 

where sub_folder startup.h located compiler still says cannot find source file: startup.h. doing wrong?

cause code before:

new_library(startevn ${sources} ${headers})

it did tell library's location,

but after, include_directories() maybe isn't.

try:

set(include_dir /new_folder_location/sub_folder) include_directories (${include_dir})     # make sure .h inside. 

(or need use find_library() of cmake before check if rightly found.)


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -