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

MinGW and MacOS Fixes #25

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
93 changes: 93 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
* text=auto

*.txt text
*.md text

#sources
*.c text
*.cc text
*.cxx text
*.cpp text
*.c++ text
*.hpp text
*.h text
*.h++ text
*.hh text

# Compiled Object files
*.slo binary
*.lo binary
*.o binary
*.obj binary

# Precompiled Headers
*.gch binary
*.pch binary

# Compiled Dynamic libraries
*.so binary
*.dylib binary
*.dll binary

# Compiled Static libraries
*.lai binary
*.la binary
*.a binary
*.lib binary

# Executables
*.exe binary
*.out binary
*.app binary

###############################################################################
#
# Visual Studio
#
# Set the merge driver for project and solution files
#
# Merging from the command prompt will add diff markers to the files if there
# are conflicts (Merging from VS is not affected by the settings below, in VS
# the diff markers are never inserted). Diff markers may cause the following
# file extensions to fail to load in VS. An alternative would be to treat
# these files as binary and thus will always conflict and require user
# intervention with every merge. To do so, just comment the entries below and
# uncomment the group further below
###############################################################################

*.sln text eol=crlf
*.csproj text eol=crlf
*.vbproj text eol=crlf
*.vcxproj text eol=crlf
*.vcproj text eol=crlf
*.dbproj text eol=crlf
*.fsproj text eol=crlf
*.lsproj text eol=crlf
*.wixproj text eol=crlf
*.modelproj text eol=crlf
*.sqlproj text eol=crlf
*.wmaproj text eol=crlf

*.xproj test eol=crlf
*.props text eol=crlf
*.filters text eol=crlf
*.vcxitems text eol=crlf


#*.sln merge=binary
#*.csproj merge=binary
#*.vbproj merge=binary
#*.vcxproj merge=binary
#*.vcproj merge=binary
#*.dbproj merge=binary
#*.fsproj merge=binary
#*.lsproj merge=binary
#*.wixproj merge=binary
#*.modelproj merge=binary
#*.sqlproj merge=binary
#*.wwaproj merge=binary

#*.xproj merge=binary
#*.props merge=binary
#*.filters merge=binary
#*.vcxitems merge=binary
8 changes: 5 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
bin/
build/
*.txt.user
bin
build
libglfw3.a
libglfw3_d.a
libsb7_d.a
10 changes: 7 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required (VERSION 2.6)
cmake_minimum_required (VERSION 3.0)

project (superbible7)

Expand All @@ -22,6 +22,10 @@ set (CMAKE_DEBUG_POSTFIX "_d")

if(WIN32)
set(COMMON_LIBS sb7 optimized glfw3 debug glfw3_d ${GLFW_LIBRARIES} ${OPENGL_LIBRARIES})
elseif(APPLE)
set(COMMON_LIBS sb7 glfw3 ${OPENGL_LIBRARIES}
"-framework Cocoa -framework IOKit"
"-framework CoreFoundation -framework CoreVideo")
elseif (UNIX)
find_package(PkgConfig REQUIRED)
pkg_check_modules(GLFW REQUIRED glfw3)
Expand Down Expand Up @@ -91,13 +95,13 @@ set(EXAMPLES
noperspective
normalviewer
objectexploder
ompparticles
# ompparticles
packetbuffer
perpixelgloss
phonglighting
polygonsmooth
prefixsum
pmbfractal
# pmbfractal
pmbstreaming
prefixsum2d
programinfo
Expand Down
14 changes: 14 additions & 0 deletions HOWTOBUILD.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,20 @@ Open the resulting superbible7.sln project in Visual Studio.

The examples will build into the `bin` directory.

Windows / CodeBlocks + MINGW32
------------------------------

The basic process is the same. CodeBlocks does not recognize build configurations, so simply build with
the default config and copy `glwf3.lib` and skip `glfw3_d.lib`.

By default, CodeBlocks/MINGW32 does not come with OpenMP, so you may want to comment out (using `#`)
building of `ompparticles` and `pmbfractals` or manually install OpenMP.

C++11 is not the default language standard as of CodeBlocks 16.01. The use of the `M_PI` macro is not
strict C++11, so the compiler needs to be instructed to relax that requirement. To achieve this, add
the following to the `CMAKE_CXX_FLAGS` when configuring:
`-std=c++11 -U__STRICT_ANSI__ -D_USE_MATH_DEFINES`

Linux
-----

Expand Down
22 changes: 22 additions & 0 deletions extern/glfw-3.2.1/.appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
branches:
only:
- ci
- master
skip_tags: true
environment:
matrix:
- BUILD_SHARED_LIBS: ON
- BUILD_SHARED_LIBS: OFF
matrix:
fast_finish: true
build_script:
- mkdir build
- cd build
- cmake -DBUILD_SHARED_LIBS=%BUILD_SHARED_LIBS% ..
- cmake --build .
notifications:
- provider: Email
to:
- [email protected]
- on_build_failure: true
- on_build_success: false
Loading