diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b9ec9b3 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +*/*bin*/ +Makefile \ No newline at end of file diff --git a/README.md b/README.md index 37c4a43..d8e3321 100644 --- a/README.md +++ b/README.md @@ -29,6 +29,24 @@ To use, `#include"cnpy.h"` in your source code. Compile the source code mycode.c ```bash g++ -o mycode mycode.cpp -L/path/to/install/dir -lcnpy -lz --std=c++11 +``` +## Include In Premake +- just clone it and add the path to the `includedirs` +- link it with the project +- includ The path in the group that you group the you want +```lua +includedirs { + "../path/from/lua_premake/to/cnpy", -- add the path +} +links { +-- link it with the project + "cnpy" +} + +group "Dependencies" + include "../path/from/lua_premake/to/cnpy" -- add the path +group "" + ``` # Description: diff --git a/premake5.lua b/premake5.lua new file mode 100644 index 0000000..5089369 --- /dev/null +++ b/premake5.lua @@ -0,0 +1,40 @@ +-- NOTE : You Have To Defind `outputdir` +project "cnpy" + kind "StaticLib" + language "C" + staticruntime "off" + warnings "off" + + targetdir ("bin/%{prj.name}") + objdir ("bin-int/%{prj.name}") + + files { + "cnpy.cpp" , "cnpy.h" , + } + links { + "z" + } + + filter "system:linux" + pic "On" + + systemversion "latest" + + + + filter "system:windows" + systemversion "latest" + + + filter "configurations:Debug" + runtime "Debug" + symbols "on" + + filter "configurations:Release" + runtime "Release" + optimize "speed" + + filter "configurations:Dist" + runtime "Release" + optimize "speed" + symbols "off"