Developer forum
cancel
Showing results for 
Search instead for 
Did you mean: 

CMake Template for Archicad Add-Ons

Viktor Kovacs
Enthusiast
We are happy to announce our latest development to make Archicad Add-On developers' life easier — a CMake template for C++ Add-On development.

With this solution you can easily generate IDE projects for Archicad Add-Ons, so you can work in your favorite environment. CMake supports Visual Studio and XCode projects, or you may use Visual Studio Code for development.

You can find detailed instructions on the link below. Please let us know if you have any questions or recommendations.

You can access the CMake template on GitHub:
https://github.com/GRAPHISOFT/archicad-addon-cmake-template
4 REPLIES 4

Jay Chung
Newcomer
Hi,

I'm new to coding and add on development in general

I tried following these steps but when I run the commands in visual studio 17 I get an error message saying my visual studio is missing cmakelists.txt?

How do I fix this issue?

Thanks

Viktor Kovacs
Enthusiast
You have to run the commands from the root directory of the Add-On.

dushyant
Booster

I am trying to include a sub-folder under Sources/AddOn  which has some header files that I need to include in some CPP files. 

Path to additional header files: Sources/AddOn/SubDir/Include

I tried the following in the CMakeLists.txt:

  1. On line 112, changed GLOB to GLOB_RECURSE
  2. Added another include dir in: files (GLOB AddOnHeaderFiles ... like so:

 

file (GLOB AddOnHeaderFiles
	${AddOnSourcesFolder}/*.h
	${AddOnSourcesFolder}/*.hpp
        ${AddOnSourcesFolder}/SubDir/Include/*.h
)​

 

  • Added include_directories():

 

include_directories("Sources/AddOn/SubDir/Include")​

 

But none of these help cmake include the additional header files in the sub-dir.

For the additional .lib that I need to include, I edited line 171, like so:

 

file (GLOB LibFilesInFolder ${AC_API_DEVKIT_DIR}/Support/Modules/*/*/*.lib ${AddOnSourcesFolder}/SubDir/Lib/*.lib)

 

Please tell what's the right way to include source files in sub-directories under Sources/AddOn.

 

Thanks!

dushyant
Booster

Anyone? Need help with this..

@Viktor Kovacs  , @Tibor Lorantfy ?

Still looking?

Browse more topics

Back to forum

See latest solutions

Accepted solutions

Start a new discussion!