1 - The first thing you should do, you should set user variables inside environment variables
for microsoft visual studio ( MSVCDir ) - HOUDINIPATH directory and CMAKE_PREFIX_PATH

2 - houdini uses visual studio 2017+
3 - open your microsoft visual studio and create a new C++ file


4 - save your C++ main (i mean save your file with the name main as you can see in the image below) file inside a folder inside your desktop and rename the folder to My first HDK

5 - copy all the line and paste them inside notepad and remove every lines that started with # sign
as you can see i changed SOP_Star.c and SOP_Star.h to main.cpp under the add_library
in the cmake_minimum_required my version 3.16.4 , because I installed Cmake 3.16.4
in the project line you can change My_HDK_Project to whatever you want
in the set( library_name SOP_Star) you can change SOP_Star to whatever you want

6 - save the notepad file inside the My first HDK folder with the name CMakeLists
now we have a folder with two files

7 - install CMake from their website
8 - create a build folder inside the My first HDK folder

9 - open the CMake

10 - brows your source - your Source is : My first HDK folder
brows your build folder - your build is : the build folder inside the My first HDK folder

11 - click on configure button
and select whatever visual studio version you use (remember houdini uses visual studio 2017+) and click on finish button and wait ....

12 - click on config again and it says configuring done

13 - after that click on generate button and that's it
it says generating done
Cmake create some files inside the build folder

14 - open My_HDK_Project.sln file and you're ready to go
you can use all houdini preprocessor and classes

ENJOY YOUR FUTURE PLUGINS
Comments