Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

premake #101

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*/*bin*/
Makefile
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
40 changes: 40 additions & 0 deletions premake5.lua
Original file line number Diff line number Diff line change
@@ -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"