-
-
Notifications
You must be signed in to change notification settings - Fork 466
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update CMakeLists and some code for building on Linux
- Loading branch information
Showing
35 changed files
with
677 additions
and
87 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
cmake_minimum_required(VERSION 2.8.0) | ||
project(OpenXRay) | ||
|
||
include(${PROJECT_SOURCE_DIR}/cmake/utils.cmake) | ||
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake) | ||
|
||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive --std=c++17") | ||
|
||
add_definitions(-D_MT -D_CPPUNWIND -DPURE_DYNAMIC_CAST -DDECLARE_SPECIALIZATION -DM_NOSTDCONTAINERS_EXT -DUSE_OGL) | ||
|
||
set(LUA_INCLUDE_DIR Externals/luajit/src) | ||
set(LUA_LIBRARIES luajit) | ||
set(LUA_FOUND 1) | ||
if (NOT WIN32) | ||
find_package(OpenSSL REQUIRED) | ||
find_package(Theora REQUIRED) | ||
find_package(OGG REQUIRED) | ||
find_package(SDL2 REQUIRED) | ||
find_package(LZO REQUIRED) | ||
find_package(JPEG REQUIRED) | ||
endif() | ||
|
||
include_directories(${LUA_INCLUDE_DIR}) | ||
include_directories(${CMAKE_SOURCE_DIR} {CMAKE_SOURCE_DIR}/Common ${CMAKE_SOURCE_DIR}/Externals ${CMAKE_SOURCE_DIR}/Externals/gli/external/glm ${CMAKE_SOURCE_DIR}/../sdk/include/loki) | ||
This comment has been minimized.
Sorry, something went wrong. |
||
|
||
add_subdirectory(Externals) | ||
add_subdirectory(src) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
add_subdirectory(luajit) | ||
add_subdirectory(luabind) | ||
add_subdirectory(lzo) | ||
add_subdirectory(cximage) | ||
add_subdirectory(NVTT) | ||
#add_subdirectory(gli) | ||
#add_subdirectory(glew) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
cmake_minimum_required(VERSION 2.8.0) | ||
project(nvtt) | ||
add_definitions(-DHAVE_SIGNAL_H -DHAVE_EXECINFO_H) | ||
add_subdirectory(src/nvcore) | ||
add_subdirectory(src/nvimage) | ||
add_subdirectory(src/nvmath) | ||
add_subdirectory(src/nvtt) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
// This code is in the public domain -- Ignacio Castaño <[email protected]> | ||
// This code is in the public domain -- Ignacio Castaño <[email protected]> | ||
|
||
#include <nvmath/Triangle.h> | ||
|
||
using namespace nv; | ||
|
||
|
||
/// Tomas Möller, barycentric ray-triangle test. | ||
/// Tomas Möller, barycentric ray-triangle test. | ||
bool rayTest_Moller(const Triangle & t, Vector3::Arg orig, Vector3::Arg dir, float * out_t, float * out_u, float * out_v) | ||
{ | ||
// find vectors for two edges sharing vert0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
// This code is in the public domain -- Ignacio Castaño <[email protected]> | ||
// This code is in the public domain -- Ignacio Castaño <[email protected]> | ||
|
||
#ifndef NV_MATH_TRIANGLE_H | ||
#define NV_MATH_TRIANGLE_H | ||
|
@@ -44,7 +44,7 @@ namespace nv | |
}; | ||
|
||
|
||
// Tomas Akenine-Möller box-triangle test. | ||
// Tomas Akenine-Möller box-triangle test. | ||
NVMATH_API bool triBoxOverlap(Vector3::Arg boxcenter, Vector3::Arg boxhalfsize, const Triangle & triangle); | ||
NVMATH_API bool triBoxOverlapNoBounds(Vector3::Arg boxcenter, Vector3::Arg boxhalfsize, const Triangle & triangle); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
cmake_minimum_required(VERSION 2.8.0) | ||
project(cximage) | ||
|
||
set(SOURCES | ||
ximacfg.cpp | ||
ximaenc.cpp | ||
ximaexif.cpp | ||
ximage.cpp | ||
ximainfo.cpp | ||
ximaint.cpp | ||
ximajpg.cpp | ||
ximalpha.cpp | ||
ximalyr.cpp | ||
ximapal.cpp | ||
ximasel.cpp | ||
ximath.cpp | ||
xmemfile.cpp | ||
) | ||
|
||
set(HEADERS | ||
xfile.h | ||
ximacfg.h | ||
ximadef.h | ||
ximage.h | ||
ximaiter.h | ||
ximajpg.h | ||
ximath.h | ||
xiofile.h | ||
xmemfile.h | ||
) | ||
|
||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive --std=c++14") | ||
add_definitions(-DCXIMAGE_BUILD) | ||
|
||
include_directories("." ${CMAKE_SOURCE_DIR}) | ||
|
||
add_library(cximage STATIC ${SOURCES} ${HEADERS}) | ||
|
||
set_target_properties(cximage PROPERTIES PREFIX "") | ||
target_link_libraries(cximage) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Looks like
$
(dollar sign) is missing before{CMAKE_SOURCE_DIR}/Common
.