Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » 4DIAC - Framework for Distributed Industrial Automation and Control » How do I associate header files with other folders
How do I associate header files with other folders [message #1837350] Thu, 28 January 2021 09:01 Go to next message
zhao xiaolong is currently offline zhao xiaolongFriend
Messages: 5
Registered: November 2020
Junior Member
Hello everyone, I wrote a statement to add a header file according to the cmMakelists.txt of mqtt_paho folder, as follows

forte_add_handler(pcf8591 /usr/include/pcf8591)

But, when I press the generate button in cmake-gui, it will add the current directory where cmakelists.txt is located, which ended up being "forte/ext_modules/test/usr/include". Then it can't find pcf8591. Do you know how to solve this problem? Thank you very much!



My cmakelists.txt:

forte_add_module(RECEIVE_VOLTAGE "Example test module")
forte_add_handler(pcf8591 /usr/include/pcf8591)
forte_add_handler(wiringPi /usr/include/wiringPi)
forte_add_sourcefile_hcpp(voltage_receive)


The fault of cmake-gui:

CMake Error at src/CMakeLists.txt:261 (add_library):
Cannot find source file:
/home/zxl/FORTEdev/ext_modules/Receive_Voltage/usr/include/pcf8591.h
Tried extensions .c .C .c++ .cc .cpp .cxx .cu .m .M .mm .h .hh .h++ .hm
.hpp .hxx .in .txx
CMake Error at src/CMakeLists.txt:261 (add_library):
No SOURCES given to target: FORTE_LITE
Re: How do I associate header files with other folders [message #1838384 is a reply to message #1837350] Tue, 23 February 2021 20:39 Go to previous message
Noname Noname is currently offline Noname NonameFriend
Messages: 6
Registered: October 2020
Junior Member
I think you can append this to your CMakeLists.txt to add the folder as an include directory:
forte_add_include_directories(${CMAKE_CURRENT_SOURCE_DIR})
Previous Topic:BIg issue with composite FB export in 4diac IDE 1.13
Next Topic:Forte on STM32F7 throws Hard Fault when creating ForteInstance
Goto Forum:
  


Current Time: Thu Apr 25 08:22:33 GMT 2024

Powered by FUDForum. Page generated in 0.03404 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top