Skip to content

Commit

Permalink
Merge 25c67de into f135b7c
Browse files Browse the repository at this point in the history
  • Loading branch information
AnotherFoxGuy authored Mar 11, 2018
2 parents f135b7c + 25c67de commit d9455f9
Show file tree
Hide file tree
Showing 36 changed files with 1,282 additions and 172 deletions.
19 changes: 19 additions & 0 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
version: 1.3.0.{build}
pull_requests:
do_not_increment_build_number: true
image: Visual Studio 2017
cache: C:\Tools\vcpkg\installed\
configuration: Release
install:
- cmd: cd C:\Tools\vcpkg\ && git pull
- cmd: .\bootstrap-vcpkg.bat
- cmd: vcpkg install assimp libepoxy sdl2 sdl2-mixer bullet3 tinyxml2 freeimage
before_build:
- cmd: cd C:\projects\glPortal
- cmd: git submodule init && git submodule update
- cmd: cmake -DCMAKE_TOOLCHAIN_FILE=C:/Tools/vcpkg/scripts/buildsystems/vcpkg.cmake .
build:
project: RadixEngine.sln
parallel: true
verbosity: normal
test: off
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ docs/
/Default
/.*
!.travis.yml
!.appveyor.yml
/glPortal.*
/build
Debug/
Expand Down
24 changes: 14 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,17 @@ set(CMAKE_CXX_STANDARD 14)

list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)

#### UTILITY ####

#### UTILITY ####
set(RADIX_DEFINITIONS "")
function(radix_add_exported_definition)
add_definitions("-D${ARGV0}")
list(APPEND RADIX_DEFINITIONS "${ARGV0}")
set(RADIX_DEFINITIONS "${RADIX_DEFINITIONS}" PARENT_SCOPE)
endfunction(radix_add_exported_definition)

#### COMPILE-TIME SETTINGS ####

#### COMPILE-TIME SETTINGS ####
set(RADIX_GL_LOADER "libepoxy" CACHE STRING "OpenGL loader to use. One of 'libepoxy', 'glad'")

if ("${RADIX_GL_LOADER}" STREQUAL "libepoxy")
Expand All @@ -37,14 +37,14 @@ if ("${RADIX_GL_LOADER}" STREQUAL "glad")
radix_add_exported_definition("RADIX_GL_USE_GLAD")
endif()

#### PLATFORM-SPECIFIC FIXES ####

if(DEFINED WIN32)
#### PLATFORM-SPECIFIC FIXES ####
if(WIN32)
add_definitions("-D_USE_MATH_DEFINES")
endif()

#### LIBRARIES ####

#### LIBRARIES ####
set(RADIX_INCLUDE_DIRS "")

find_package(OpenGL REQUIRED)
Expand All @@ -53,10 +53,10 @@ list(APPEND RADIX_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/external/stx/include)

set(RADIX_LIBRARIES ${OPENGL_gl_LIBRARY})

find_package(PkgConfig REQUIRED)
find_package(PkgConfig)

if (RADIX_GL_USE_LIBEPOXY)
pkg_search_module(EPOXY REQUIRED epoxy)
find_package(EPOXY REQUIRED)
list(APPEND RADIX_INCLUDE_DIRS ${EPOXY_INCLUDE_DIRS})
list(APPEND RADIX_LIBRARIES ${EPOXY_LIBRARIES})
elseif (RADIX_GL_USE_GLAD)
Expand Down Expand Up @@ -104,24 +104,28 @@ find_package(FreeImage REQUIRED)
list(APPEND RADIX_INCLUDE_DIRS ${FREEIMAGE_INCLUDE_DIR})
list(APPEND RADIX_LIBRARIES ${FREEIMAGE_LIBRARIES})

set(RADIX_ENABLE_PROFILER OFF CACHE BOOL "Enable Radix's profiler")
find_package(easy_profiler REQUIRED)
list(APPEND RADIX_INCLUDE_DIRS ${EASY_PROFILER_INCLUDE_DIR})
set(RADIX_ENABLE_PROFILER ON CACHE BOOL "Enable Radix's profiler")
if (RADIX_ENABLE_PROFILER)
list(APPEND RADIX_LIBRARIES ${EASY_PROFILER_LIBRARIES})
else ()
radix_add_exported_definition("DISABLE_EASY_PROFILER")
endif ()


set(PORTAL_TEST_LIBRARIES ${RADIX_LIBRARIES})

list(APPEND RADIX_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/external/serine/include")

#### ENGINE ####

#### ENGINE ####
if (${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
add_definitions("-Wall")
endif ()
if (WIN32)
add_definitions("/w")
endif ()

find_package(RadixEntity REQUIRED)
list(APPEND RADIX_INCLUDE_DIRS ${RADIXENTITY_INCLUDE_DIR})
Expand All @@ -148,8 +152,8 @@ if (RADIX_EXPORT_CMAKE_PACKAGE_VARS)
set(RADIX_DEFINITIONS "${RADIX_DEFINITIONS}" PARENT_SCOPE)
endif ()

#### UNIT TESTING ####

#### UNIT TESTING ####
include_directories(${RADIX_INCLUDE_DIRS} ${UnitTestPlusPlus_INCLUDE_DIRS})
enable_testing()
add_subdirectory(tests)
Expand Down
22 changes: 14 additions & 8 deletions cmake/FindAssimp.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,18 @@ FIND_PATH( ASSIMP_INCLUDE_DIR assimp/mesh.h
/opt/local/include
)

FIND_LIBRARY( ASSIMP_LIBRARY assimp
/usr/lib64
/usr/lib
/usr/local/lib
/opt/local/lib
)
IF(WIN32)
FIND_LIBRARY( ASSIMP_LIBRARY assimp-vc140-mt
lib
)
ELSE(WIN32)
FIND_LIBRARY( ASSIMP_LIBRARY assimp
/usr/lib64
/usr/lib
/usr/local/lib
/opt/local/lib
)
ENDIF(WIN32)

IF(ASSIMP_INCLUDE_DIR AND ASSIMP_LIBRARY)
SET( ASSIMP_FOUND TRUE )
Expand All @@ -27,6 +33,6 @@ ENDIF(ASSIMP_INCLUDE_DIR AND ASSIMP_LIBRARY)
# handle REQUIRED and QUIET options
include ( FindPackageHandleStandardArgs )

find_package_handle_standard_args ( Assimp
find_package_handle_standard_args ( Assimp
REQUIRED_VARS ASSIMP_LIBRARY ASSIMP_INCLUDE_DIR
)
)
17 changes: 17 additions & 0 deletions cmake/FindEPOXY.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copyright (c) 2015 Andrew Kelley
# This file is MIT licensed.
# See http://opensource.org/licenses/MIT

# This module defines
# EPOXY_FOUND
# EPOXY_INCLUDE_DIR
# EPOXY_LIBRARY

find_path(EPOXY_INCLUDE_DIR NAMES epoxy/gl.h epoxy/glx.h)

find_library(EPOXY_LIBRARY NAMES epoxy)

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(EPOXY DEFAULT_MSG EPOXY_LIBRARY EPOXY_INCLUDE_DIR)

mark_as_advanced(EPOXY_INCLUDE_DIR EPOXY_LIBRARY)
2 changes: 1 addition & 1 deletion external/easy_profiler
Submodule easy_profiler updated 141 files
2 changes: 2 additions & 0 deletions include/radix/util/Profiling.hpp
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

#ifndef RADIX_UTIL_PROFILING_HPP
#define RADIX_UTIL_PROFILING_HPP

Expand All @@ -14,3 +15,4 @@
#define PROFILER_MAIN_THREAD EASY_MAIN_THREAD

#endif /* RADIX_UTIL_PROFILING_HPP */

Loading

0 comments on commit d9455f9

Please sign in to comment.