Skip to content

Commit

Permalink
fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
alecjacobson committed Sep 4, 2019
1 parent a13c871 commit b2acaa2
Show file tree
Hide file tree
Showing 6 changed files with 18,631 additions and 5 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "eigen"]
path = eigen
url = https://github.com/eigenteam/eigen-git-mirror
32 changes: 31 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,34 @@
cmake_minimum_required(VERSION 2.6)
project(raycasting)

include("${CMAKE_CURRENT_SOURCE_DIR}/shared/cmake/CMakeLists.txt")
# Prepare the build environment
set(ROOT "${CMAKE_CURRENT_SOURCE_DIR}")
option(USE_SOLUTION "Use solution" OFF)
# Add your project files
include_directories("include/")
if(USE_SOLUTION)
set(SRC_DIR "solution/")
else()
set(SRC_DIR "src/")
endif()
file(GLOB SRCFILES "${SRC_DIR}/*.cpp")
list(APPEND SRCFILES main.cpp)
# create executable
include(CheckCXXCompilerFlag)

CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
CHECK_CXX_COMPILER_FLAG("-std=c++0x" COMPILER_SUPPORTS_CXX0X)
if(COMPILER_SUPPORTS_CXX11)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
elseif(COMPILER_SUPPORTS_CXX0X)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
else()
message(STATUS "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. Please use a different C++ compiler.")
endif()

if(HW2LIB_DIR)
link_directories(${HW2LIB_DIR})
endif()

add_executable(${PROJECT_NAME} ${SRCFILES})
target_include_directories(${PROJECT_NAME} SYSTEM PUBLIC ${ROOT}/eigen)
6 changes: 4 additions & 2 deletions README.html
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,12 @@
<h1 id="computergraphics–raycasting">Computer Graphics – Ray Casting</h1>

<blockquote>
<p><strong>To get started:</strong> Clone this repository by issuing:</p>
<p><strong>To get started:</strong> Clone this repository and its submodule using</p>

<pre><code>git clone http://github.com/alecjacobson/computer-graphics-ray-casting.git
<pre><code>git clone --recursive http://github.com/alecjacobson/computer-graphics-ray-casting.git
</code></pre>

<p><strong>Do not fork:</strong> Clicking &#8220;Fork&#8221; will create a <em>public</em> repository. If you&#8217;d like to use GitHub while you work on your assignment, then mirror this repo as a new <em>private</em> repository: https://stackoverflow.com/questions/10065526/github-how-to-make-a-fork-of-public-repository-private</p>
</blockquote>

<h2 id="background">Background</h2>
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Computer Graphics – Ray Casting

> **To get started:** Clone this repository using
> **To get started:** Clone this repository and its submodule using
>
> git clone http://github.com/alecjacobson/computer-graphics-ray-casting.git
> git clone --recursive http://github.com/alecjacobson/computer-graphics-ray-casting.git
>
> **Do not fork:** Clicking "Fork" will create a _public_ repository. If you'd like to use GitHub while you work on your assignment, then mirror this repo as a new _private_ repository: https://stackoverflow.com/questions/10065526/github-how-to-make-a-fork-of-public-repository-private
Expand Down
1 change: 1 addition & 0 deletions eigen
Submodule eigen added at c50d58
Loading

0 comments on commit b2acaa2

Please sign in to comment.