Support included directory

已完成

Hi,

I have project constructed from 2 major parts(2 projects). One is dynamic library(/engine) and the second one is executable(/gui)

My project structure is:

CMakes looks like this:

CMakeLists.txt

cmake_minimum_required(VERSION 3.16)

add_subdirectory(engine)
add_subdirectory(gui)

 

/engine/CMakeLists.txt

cmake_minimum_required(VERSION 3.16)

set(CMAKE_CXX_STANDARD 17)

add_library(enginelib SHARED library.cpp library.h)

 

/gui/CMakeLists.txt

cmake_minimum_required(VERSION 3.16)

set(CMAKE_CXX_STANDARD 17)

include_directories(../engine)
add_executable(gui main.cpp)
target_link_libraries(gui PRIVATE enginelib)

 

Project builds correctly, gui is using engine and it works.
However Clion underscores including from engine and doesn't show things from engine.

How to fix this?

 

Thanks for help :)

Btw, It's my first time setting project like this, am I including the engine into gui correctly? Or there is a better way to do this?

 

评论操作 固定链接

Hello!

I can't reproduce the issue on my side. Please send your project to clion-support at jetbrains.com. Please also add the link to this thread in the email and specify CLion's version that you use. Thank you in advance.

0

请先登录再写评论。