example_bass: use folders for external deps
BASS and SDL both add a set of headers and libs that needs to be included into the project. Allow the user to put these headers in a subfolder called "include" and the libs in a subfolder called "lib".
This commit is contained in:
parent
8fb9aa6257
commit
1096fb3119
13
README
13
README
@ -14,18 +14,19 @@ select "Build" -> "Build Solution" from the menu to build the editor.
|
|||||||
Compile Example
|
Compile Example
|
||||||
---------------
|
---------------
|
||||||
GNU Rocket contains an example client called example_bass. This is a simple
|
GNU Rocket contains an example client called example_bass. This is a simple
|
||||||
Direct3D 9.0 and BASS audio library application, that demonstrates how to
|
OpenGL, SDL 1.2 and BASS audio library application, that demonstrates how to
|
||||||
use the GNU Rocket API.
|
use the GNU Rocket API.
|
||||||
|
|
||||||
Before compiling the example, you need to make sure you have recent
|
Before compiling the example, you need to make sure you have recent
|
||||||
Microsoft DirectX and BASS SDKs. These can be downloaded from the following
|
SDL and BASS libraries and includes. These can be downloaded from the
|
||||||
web-sites:
|
following web-sites:
|
||||||
|
|
||||||
http://msdn.microsoft.com/directx/
|
http://www.libsdl.org/
|
||||||
http://www.un4seen.com/
|
http://www.un4seen.com/
|
||||||
|
|
||||||
The BASS SDK is installed by copying bass.dll, bass.h and bass.lib to the
|
The header files and libraries can be installed local to the project by
|
||||||
example_bass-folder.
|
copying all .lib-files to the example_bass/lib/, all .h files to
|
||||||
|
example_bass/inclide/, and all .dll files to the example_bass/.
|
||||||
|
|
||||||
Once the prerequisites are installed, the example can be compiled much like
|
Once the prerequisites are installed, the example can be compiled much like
|
||||||
the editor; by opening examples.sln and selecting "Build" -> "Build Solution"
|
the editor; by opening examples.sln and selecting "Build" -> "Build Solution"
|
||||||
|
|||||||
@ -10,12 +10,12 @@
|
|||||||
#include <SDL.h>
|
#include <SDL.h>
|
||||||
#undef main /* avoid SDL's nasty SDLmain hack */
|
#undef main /* avoid SDL's nasty SDLmain hack */
|
||||||
#include <SDL_opengl.h>
|
#include <SDL_opengl.h>
|
||||||
|
#include <bass.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
#include "../sync/sync.h"
|
#include "../sync/sync.h"
|
||||||
#include "bass.h"
|
|
||||||
|
|
||||||
static const float bpm = 150.0f; /* beats per minute */
|
static const float bpm = 150.0f; /* beats per minute */
|
||||||
static const int rpb = 8; /* rows per beat */
|
static const int rpb = 8; /* rows per beat */
|
||||||
|
|||||||
@ -41,6 +41,7 @@
|
|||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
Optimization="0"
|
Optimization="0"
|
||||||
|
AdditionalIncludeDirectories="include"
|
||||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;SYNC_PLAYER"
|
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;SYNC_PLAYER"
|
||||||
MinimalRebuild="true"
|
MinimalRebuild="true"
|
||||||
BasicRuntimeChecks="3"
|
BasicRuntimeChecks="3"
|
||||||
@ -60,8 +61,9 @@
|
|||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
AdditionalDependencies="opengl32.lib glu32.lib SDL.lib"
|
AdditionalDependencies="opengl32.lib glu32.lib SDL.lib bass.lib"
|
||||||
LinkIncremental="2"
|
LinkIncremental="2"
|
||||||
|
AdditionalLibraryDirectories="lib"
|
||||||
GenerateManifest="false"
|
GenerateManifest="false"
|
||||||
GenerateDebugInformation="true"
|
GenerateDebugInformation="true"
|
||||||
SubSystem="1"
|
SubSystem="1"
|
||||||
@ -117,6 +119,7 @@
|
|||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalIncludeDirectories="include"
|
||||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;SYNC_PLAYER"
|
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;SYNC_PLAYER"
|
||||||
RuntimeLibrary="2"
|
RuntimeLibrary="2"
|
||||||
UsePrecompiledHeader="0"
|
UsePrecompiledHeader="0"
|
||||||
@ -134,8 +137,9 @@
|
|||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
AdditionalDependencies="opengl32.lib glu32.lib SDL.lib"
|
AdditionalDependencies="opengl32.lib glu32.lib SDL.lib bass.lib"
|
||||||
LinkIncremental="1"
|
LinkIncremental="1"
|
||||||
|
AdditionalLibraryDirectories="lib"
|
||||||
GenerateDebugInformation="true"
|
GenerateDebugInformation="true"
|
||||||
SubSystem="1"
|
SubSystem="1"
|
||||||
OptimizeReferences="2"
|
OptimizeReferences="2"
|
||||||
@ -191,6 +195,7 @@
|
|||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
Optimization="0"
|
Optimization="0"
|
||||||
|
AdditionalIncludeDirectories="include"
|
||||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS"
|
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS"
|
||||||
MinimalRebuild="true"
|
MinimalRebuild="true"
|
||||||
BasicRuntimeChecks="3"
|
BasicRuntimeChecks="3"
|
||||||
@ -210,8 +215,9 @@
|
|||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
AdditionalDependencies="opengl32.lib glu32.lib SDL.lib"
|
AdditionalDependencies="opengl32.lib glu32.lib SDL.lib bass.lib"
|
||||||
LinkIncremental="2"
|
LinkIncremental="2"
|
||||||
|
AdditionalLibraryDirectories="lib"
|
||||||
GenerateManifest="false"
|
GenerateManifest="false"
|
||||||
GenerateDebugInformation="true"
|
GenerateDebugInformation="true"
|
||||||
SubSystem="1"
|
SubSystem="1"
|
||||||
@ -267,6 +273,7 @@
|
|||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCCLCompilerTool"
|
Name="VCCLCompilerTool"
|
||||||
|
AdditionalIncludeDirectories="include"
|
||||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS"
|
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS"
|
||||||
RuntimeLibrary="2"
|
RuntimeLibrary="2"
|
||||||
UsePrecompiledHeader="0"
|
UsePrecompiledHeader="0"
|
||||||
@ -285,8 +292,9 @@
|
|||||||
/>
|
/>
|
||||||
<Tool
|
<Tool
|
||||||
Name="VCLinkerTool"
|
Name="VCLinkerTool"
|
||||||
AdditionalDependencies="opengl32.lib glu32.lib SDL.lib"
|
AdditionalDependencies="opengl32.lib glu32.lib SDL.lib bass.lib"
|
||||||
LinkIncremental="1"
|
LinkIncremental="1"
|
||||||
|
AdditionalLibraryDirectories="lib"
|
||||||
GenerateDebugInformation="true"
|
GenerateDebugInformation="true"
|
||||||
SubSystem="1"
|
SubSystem="1"
|
||||||
OptimizeReferences="2"
|
OptimizeReferences="2"
|
||||||
@ -343,10 +351,6 @@
|
|||||||
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
|
||||||
>
|
>
|
||||||
</Filter>
|
</Filter>
|
||||||
<File
|
|
||||||
RelativePath=".\bass.lib"
|
|
||||||
>
|
|
||||||
</File>
|
|
||||||
</Files>
|
</Files>
|
||||||
<Globals>
|
<Globals>
|
||||||
</Globals>
|
</Globals>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user