Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mogemimi/oh-my-gyp
A set of GYP (Generate Your Projects) configs in the public domain
https://github.com/mogemimi/oh-my-gyp
Last synced: 2 months ago
JSON representation
A set of GYP (Generate Your Projects) configs in the public domain
- Host: GitHub
- URL: https://github.com/mogemimi/oh-my-gyp
- Owner: mogemimi
- Created: 2015-03-07T14:36:13.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-11-05T21:16:57.000Z (about 9 years ago)
- Last Synced: 2024-08-02T11:23:07.465Z (5 months ago)
- Size: 145 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome - mogemimi/oh-my-gyp - A set of GYP (Generate Your Projects) configs in the public domain (Development)
README
Oh My GYP
=========Oh My GYP is a set of simply [GYP (Generate Your Projects)](https://code.google.com/p/gyp/) configuration files to help build settings for C/C++ applications, released into the public domain.
## Getting started
First, make your project directory, and clone 'oh-my-gyp' from GitHub.
```shell
mkdir hello && cd hello
git clone https://github.com/mogemimi/oh-my-gyp.git
```Second, add `main.cpp` and `hello.gyp` to your project directory.
For example,```
hello/
├── oh-my-gyp/
│ ├── c++11.gypi
│ ├── c++14.gypi
│ └── ...
├── hello.gyp
└── main.cpp
````main.cpp`:
```cpp
#includeint main()
{
std::cout << "hello" << std::endl;
return 0;
}
````hello.gyp`:
```python
{
# (1) choose your build configs
'includes': [
'oh-my-gyp/c++14.gypi',
'oh-my-gyp/config-debug-release.gypi',
'oh-my-gyp/warn-as-error.gypi',
'oh-my-gyp/warnings-level3.gypi',
'oh-my-gyp/mac-basic.gypi',
'oh-my-gyp/win32-basic.gypi',
],
# (2) write your build target
'targets': [
{
'target_name': 'Hello',
'product_name': 'Hello',
'type': 'executable',
'sources': [
'main.cpp',
],
},
],
}
```### Generating Xcode project
To generate `.xcodeproj` file, run the following command:
```shell
gyp hello.gyp --depth=. -f xcode
```To open in Xcode, run the following into terminal:
```shell
open hello.xcodeproj
```### Generating Visual Studio 2015 project
To generate `.sln` and `.vcxproj` files, run the following command:
```shell
gyp hello.gyp --depth=. -f msvs -G msvs_version=2015
```You can try to compile `hello.sln` in Visual Studio 2015.