[CMake] Troubles with include_directories

Workbench@gmx.at workbench at gmx.at
Sat Mar 9 02:38:55 EST 2019


Hi everyone,

i've a project setup that looks like this:


abc.h

def.h

and all my other .cpp and .h files are in the folder intern. Now my 
CMakeLists.txt looks like this:

cmake_minimum_required(VERSION 3.7)
project(BS_Application)
set(SRC
     BS_AppTypes.hpp
     BS_IEvent.hpp
     BS_ISystem.hpp
     BS_IWindow.hpp
     BS_ITimerTask.hpp
     BS_IEventConsumer.hpp
     BS_Application.cpp
     BS_Button.cpp
     BS_ContextSDL.cpp
     BS_ISystem.cpp
     BS_System.cpp
     BS_SystemSDL.cpp
     BS_WindowSDL.cpp
     BS_ContextSDL.cpp
     BS_DisplayManagerSDL.cpp
     BS_Button.cpp
     BS_EventManager.cpp
     BS_EventPrinter.cpp
     BS_ModifierKeys.cpp
     BS_DisplayManager.cpp
)
set(INC
     intern
)
include_directories(${INC})
add_library(BS_Application STATIC ${SRC})

Where all files above BS_Application.cpp are in the folder intern but he 
is not able to find BS_Application.cpp but i added it to the 
include_direcotires, what am i doing wrong here ?


best regards!



More information about the CMake mailing list