Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Libretro
cannonball
Commits
cd620062
Commit
cd620062
authored
Jun 30, 2013
by
reassembler
Browse files
Open GL Build System Toggle
parent
2074166a
Changes
3
Hide whitespace changes
Inline
Side-by-side
cmake/CMakeLists.txt
View file @
cd620062
cmake_minimum_required
(
VERSION 2.6.2
)
project
(
cannonball
)
set
(
DCMAKE default.cmake
)
set
(
CMDIR ../cmake
)
...
...
@@ -97,22 +98,36 @@ set(src_hwaudio
"
${
main_cpp_base
}
/hwaudio/soundchip.cpp"
"
${
main_cpp_base
}
/hwaudio/ym2151.cpp"
)
set
(
src_sdl
"
${
main_cpp_base
}
/sdl/audio.hpp"
"
${
main_cpp_base
}
/sdl/timer.hpp"
"
${
main_cpp_base
}
/sdl/input.hpp"
"
${
main_cpp_base
}
/sdl/renderbase.hpp"
"
${
main_cpp_base
}
/sdl/rendergl.hpp"
"
${
main_cpp_base
}
/sdl/rendersw.hpp"
"
${
main_cpp_base
}
/sdl/audio.cpp"
"
${
main_cpp_base
}
/sdl/timer.cpp"
"
${
main_cpp_base
}
/sdl/input.cpp"
"
${
main_cpp_base
}
/sdl/renderbase.cpp"
"
${
main_cpp_base
}
/sdl/rendergl.cpp"
"
${
main_cpp_base
}
/sdl/rendersw.cpp"
)
if
(
OPENGL
)
set
(
src_sdl
"
${
main_cpp_base
}
/sdl/audio.hpp"
"
${
main_cpp_base
}
/sdl/timer.hpp"
"
${
main_cpp_base
}
/sdl/input.hpp"
"
${
main_cpp_base
}
/sdl/renderbase.hpp"
"
${
main_cpp_base
}
/sdl/rendergl.hpp"
"
${
main_cpp_base
}
/sdl/audio.cpp"
"
${
main_cpp_base
}
/sdl/timer.cpp"
"
${
main_cpp_base
}
/sdl/input.cpp"
"
${
main_cpp_base
}
/sdl/renderbase.cpp"
"
${
main_cpp_base
}
/sdl/rendergl.cpp"
)
else
()
set
(
src_sdl
"
${
main_cpp_base
}
/sdl/audio.hpp"
"
${
main_cpp_base
}
/sdl/timer.hpp"
"
${
main_cpp_base
}
/sdl/input.hpp"
"
${
main_cpp_base
}
/sdl/renderbase.hpp"
"
${
main_cpp_base
}
/sdl/rendersw.hpp"
"
${
main_cpp_base
}
/sdl/audio.cpp"
"
${
main_cpp_base
}
/sdl/timer.cpp"
"
${
main_cpp_base
}
/sdl/input.cpp"
"
${
main_cpp_base
}
/sdl/renderbase.cpp"
"
${
main_cpp_base
}
/sdl/rendersw.cpp"
)
endif
()
set
(
src_directx
"
${
main_cpp_base
}
/directx/ffeedback.hpp"
...
...
@@ -213,6 +228,10 @@ if(WIN32)
set
(
SRCS
${
SRCS
}
../res/cannonball.rc
)
endif
(
WIN32
)
if
(
OPENGL
)
add_definitions
(
-DWITH_OPENGL
)
endif
()
add_executable
(
cannonball
${
SRCS
}
)
# Copy Configuration file to current build
...
...
cmake/default.cmake
View file @
cd620062
...
...
@@ -9,6 +9,9 @@ if (NOT DEFINED ENV{DXSDK})
message
(
FATAL_ERROR
"Warning: DirectX SDK Variable DXSDK Not Defined!"
)
endif
()
# Use OpenGL for rendering.
set
(
OPENGL 1
)
include_directories
(
"
${
sdl_root
}
/include"
)
...
...
@@ -27,9 +30,6 @@ link_directories(
"$ENV{DXSDK}/lib"
"
${
sdl_root
}
/lib"
)
# Use OpenGL for rendering. Disable to use software rendering.
add_definitions
(
-DWITH_OPENGL
)
# Location for Cannonball to create save files
# Used to auto-generate setup.hpp with various file paths
...
...
cmake/mingw.cmake
View file @
cd620062
...
...
@@ -11,6 +11,9 @@ endif()
find_package
(
SDL REQUIRED
)
# Use OpenGL for rendering.
set
(
OPENGL 1
)
include_directories
(
"
${
SDL_INCLUDE_DIR
}
"
# You may need to remove the next line based on your DirectX setup
...
...
@@ -27,11 +30,10 @@ link_libraries(cannonball
)
set
(
CMAKE_CXX_FLAGS
"-Ofast -static-libgcc -static-libstdc++"
)
# Use OpenGL for rendering. Disable to use software rendering.
add_definitions
(
-DWITH_OPENGL
)
# Location for Cannonball to create save files
# Used to auto-generate setup.hpp with various file paths
set
(
xml_directory ./
)
set
(
sdl_flags
"SDL_DOUBLEBUF | SDL_SWSURFACE"
)
\ No newline at end of file
# SDL Software Rendering Flags (ignored if OpenGL used)
set
(
sdl_flags
"SDL_SWSURFACE | SDL_DOUBLEBUF"
)
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment