forked from OpenXRay/xray-16
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4fe8751
commit 8044a7b
Showing
53 changed files
with
6,418 additions
and
6,276 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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 +1 @@ | ||
include(luajit.cmake) | ||
include(luajit.cmake) # TODO do not include and move contents of luajit.cmake file here |
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,62 +1,59 @@ | ||
project(nvcore) | ||
option(NVCORE_SHARED "Build nvcore as shared library" OFF) | ||
|
||
set(NVCORE_SHARED OFF) | ||
|
||
# XXX: check if poshlib is needed? | ||
add_subdirectory(poshlib) | ||
|
||
set(SRC_FILES | ||
"nvcore.h" | ||
"Ptr.h" | ||
"BitArray.h" | ||
"Memory.h" | ||
"Memory.cpp" | ||
"Debug.h" | ||
"Debug.cpp" | ||
"Containers.h" | ||
"StrLib.h" | ||
"StrLib.cpp" | ||
"Stream.h" | ||
"StdStream.h" | ||
"TextReader.h" | ||
"TextReader.cpp" | ||
"TextWriter.h" | ||
"TextWriter.cpp" | ||
"Radix.h" | ||
"Radix.cpp" | ||
"Library.h" | ||
"Library.cpp" | ||
) | ||
|
||
group_sources(SRC_FILES) | ||
|
||
if (NVCORE_SHARED) | ||
add_library(${PROJECT_NAME} SHARED ${SRC_FILES}) | ||
add_library(nvcore SHARED) | ||
|
||
target_compile_definitions(nvcore | ||
PRIVATE | ||
NVCORE_SHARED | ||
) | ||
else() | ||
add_library(${PROJECT_NAME} STATIC ${SRC_FILES}) | ||
add_library(nvcore STATIC) | ||
endif() | ||
|
||
target_include_directories(${PROJECT_NAME} | ||
target_sources(nvcore | ||
PRIVATE | ||
${CMAKE_CURRENT_SOURCE_DIR} | ||
${CMAKE_SOURCE_DIR}/Externals/NVTT/src | ||
${CMAKE_SOURCE_DIR}/Externals/NVTT/include | ||
nvcore.h | ||
Ptr.h | ||
BitArray.h | ||
Memory.h | ||
Memory.cpp | ||
Debug.h | ||
Debug.cpp | ||
Containers.h | ||
StrLib.h | ||
StrLib.cpp | ||
Stream.h | ||
StdStream.h | ||
TextReader.h | ||
TextReader.cpp | ||
TextWriter.h | ||
TextWriter.cpp | ||
Radix.h | ||
Radix.cpp | ||
Library.h | ||
Library.cpp | ||
) | ||
|
||
target_compile_definitions(${PROJECT_NAME} | ||
target_include_directories(nvcore | ||
PUBLIC | ||
"${CMAKE_SOURCE_DIR}/Externals/NVTT/src" | ||
"${CMAKE_SOURCE_DIR}/Externals/NVTT/include" | ||
) | ||
|
||
target_compile_definitions(nvcore | ||
PRIVATE | ||
-DNVCORE_EXPORTS | ||
$<$<BOOL:${NVCORE_SHARED}>:-DNVCORE_SHARED=1> | ||
NVCORE_EXPORTS | ||
HAVE_EXECINFO_H | ||
HAVE_SIGNAL_H | ||
) | ||
|
||
if (UNIX) | ||
target_link_libraries(${PROJECT_NAME} | ||
PRIVATE | ||
${CMAKE_DL_LIBS} # XXX: why? | ||
) | ||
endif() | ||
set_target_properties(nvcore PROPERTIES | ||
POSITION_INDEPENDENT_CODE ON | ||
) | ||
|
||
install(TARGETS ${PROJECT_NAME} LIBRARY | ||
DESTINATION ${CMAKE_INSTALL_LIBDIR} | ||
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ | ||
install(TARGETS nvcore LIBRARY | ||
DESTINATION "${CMAKE_INSTALL_LIBDIR}" | ||
) |
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,6 +1,6 @@ | ||
set(SRC_FILES | ||
"posh.c" | ||
"posh.h" | ||
) | ||
add_library(posh STATIC) | ||
|
||
add_library(posh STATIC ${SRC_FILES}) | ||
target_sources(posh PRIVATE | ||
posh.c | ||
posh.h | ||
) |
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,72 +1,65 @@ | ||
PROJECT(nvimage) | ||
|
||
set(NVIMAGE_SHARED OFF) | ||
|
||
set(SRC_FILES | ||
"nvimage.h" | ||
"FloatImage.h" | ||
"FloatImage.cpp" | ||
"Filter.h" | ||
"Filter.cpp" | ||
"Image.h" | ||
"Image.cpp" | ||
"ImageIO.h" | ||
"ImageIO.cpp" | ||
"ColorBlock.h" | ||
"ColorBlock.cpp" | ||
"BlockDXT.h" | ||
"BlockDXT.cpp" | ||
"HoleFilling.h" | ||
"HoleFilling.cpp" | ||
"DirectDrawSurface.h" | ||
"DirectDrawSurface.cpp" | ||
"Quantize.h" | ||
"Quantize.cpp" | ||
"NormalMap.h" | ||
"NormalMap.cpp" | ||
"NormalMipmap.h" | ||
"NormalMipmap.cpp" | ||
"PsdFile.h" | ||
"TgaFile.h" | ||
) | ||
|
||
group_sources(SRC_FILES) | ||
option(NVIMAGE_SHARED "Build nvimage as shared library" OFF) | ||
|
||
if (NVIMAGE_SHARED) | ||
add_library(${PROJECT_NAME} SHARED ${SRC_FILES}) | ||
add_library(nvimage SHARED) | ||
|
||
target_compile_definitions(nvimage | ||
PRIVATE | ||
NVIMAGE_SHARED=1 | ||
) | ||
else() | ||
add_library(${PROJECT_NAME} STATIC ${SRC_FILES}) | ||
add_library(nvimage STATIC) | ||
endif() | ||
|
||
target_include_directories(${PROJECT_NAME} | ||
PRIVATE | ||
${CMAKE_CURRENT_SOURCE_DIR} | ||
${CMAKE_SOURCE_DIR}/Externals/NVTT/src | ||
${CMAKE_SOURCE_DIR}/Externals/NVTT/include | ||
$<$<BOOL:${PNG_FOUND}>:${PNG_INCLUDE_DIR}> | ||
$<$<BOOL:${JPEG_FOUND}>:${JPEG_INCLUDE_DIR}> | ||
$<$<BOOL:${TIFF_FOUND}>:${TIFF_INCLUDE_DIR}> | ||
$<$<BOOL:${OPENEXR_FOUND}>:${OPENEXR_INCLUDE_PATHS}> | ||
target_sources(nvimage PRIVATE | ||
nvimage.h | ||
FloatImage.h | ||
FloatImage.cpp | ||
Filter.h | ||
Filter.cpp | ||
Image.h | ||
Image.cpp | ||
ImageIO.h | ||
ImageIO.cpp | ||
ColorBlock.h | ||
ColorBlock.cpp | ||
BlockDXT.h | ||
BlockDXT.cpp | ||
HoleFilling.h | ||
HoleFilling.cpp | ||
DirectDrawSurface.h | ||
DirectDrawSurface.cpp | ||
Quantize.h | ||
Quantize.cpp | ||
NormalMap.h | ||
NormalMap.cpp | ||
NormalMipmap.h | ||
NormalMipmap.cpp | ||
PsdFile.h | ||
TgaFile.h | ||
) | ||
|
||
target_link_libraries(${PROJECT_NAME} | ||
PRIVATE | ||
target_link_libraries(nvimage | ||
PUBLIC | ||
nvcore | ||
nvmath | ||
PRIVATE | ||
posh | ||
$<$<BOOL:${PNG_FOUND}>:${PNG_LIBRARIES}> | ||
$<$<BOOL:${JPEG_FOUND}>:${JPEG_LIBRARIES}> | ||
$<$<BOOL:${TIFF_FOUND}>:${TIFF_LIBRARIES}> | ||
$<$<BOOL:${OPENEXR_FOUND}>:${OPENEXR_LIBRARIES}> | ||
$<$<BOOL:${PNG_FOUND}>:PNG::PNG> | ||
$<$<BOOL:${JPEG_FOUND}>:JPEG::JPEG> | ||
$<$<BOOL:${TIFF_FOUND}>:TIFF::TIFF> | ||
$<$<BOOL:${OPENEXR_FOUND}>:OpenEXR::OpenEXR> | ||
) | ||
|
||
target_compile_definitions(${PROJECT_NAME} | ||
target_compile_definitions(nvimage | ||
PRIVATE | ||
-DNVIMAGE_EXPORTS | ||
$<$<BOOL:${NVIMAGE_SHARED}>:-DNVIMAGE_SHARED=1> | ||
NVIMAGE_EXPORTS | ||
) | ||
|
||
set_property(TARGET nvimage PROPERTY | ||
POSITION_INDEPENDENT_CODE ON | ||
) | ||
|
||
install(TARGETS ${PROJECT_NAME} LIBRARY | ||
DESTINATION ${CMAKE_INSTALL_LIBDIR} | ||
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ | ||
install(TARGETS nvimage LIBRARY | ||
DESTINATION "${CMAKE_INSTALL_LIBDIR}" | ||
) |
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,54 +1,46 @@ | ||
PROJECT(nvmath) | ||
|
||
set(NVMATH_SHARED OFF) | ||
|
||
set(SRC_FILES | ||
"nvmath.h" | ||
"Vector.h" | ||
"Matrix.h" | ||
"Quaternion.h" | ||
"Box.h" | ||
"Color.h" | ||
"Montecarlo.h" | ||
"Montecarlo.cpp" | ||
"Random.h" | ||
"Random.cpp" | ||
"SphericalHarmonic.h" | ||
"SphericalHarmonic.cpp" | ||
"Basis.h" | ||
"Basis.cpp" | ||
"Triangle.h" | ||
"Triangle.cpp" | ||
"TriBox.cpp" | ||
) | ||
|
||
group_sources(SRC_FILES) | ||
option(NVMATH_SHARED "Build nvmath as shared library" OFF) | ||
|
||
if (NVMATH_SHARED) | ||
add_library(${PROJECT_NAME} SHARED ${SRC_FILES}) | ||
add_library(nvmath SHARED) | ||
|
||
target_compile_definitions(nvmath | ||
PRIVATE | ||
NVCORE_SHARED | ||
) | ||
else() | ||
add_library(${PROJECT_NAME} STATIC ${SRC_FILES}) | ||
add_library(nvmath STATIC) | ||
endif() | ||
|
||
target_include_directories(${PROJECT_NAME} | ||
PRIVATE | ||
${CMAKE_CURRENT_SOURCE_DIR} | ||
${CMAKE_SOURCE_DIR}/Externals/NVTT/src | ||
${CMAKE_SOURCE_DIR}/Externals/NVTT/include | ||
target_sources(nvmath PRIVATE | ||
nvmath.h | ||
Vector.h | ||
Matrix.h | ||
Quaternion.h | ||
Box.h | ||
Color.h | ||
Montecarlo.h | ||
Montecarlo.cpp | ||
Random.h | ||
Random.cpp | ||
SphericalHarmonic.h | ||
SphericalHarmonic.cpp | ||
Basis.h | ||
Basis.cpp | ||
Triangle.h | ||
Triangle.cpp | ||
TriBox.cpp | ||
) | ||
|
||
target_link_libraries(${PROJECT_NAME} | ||
PRIVATE | ||
target_link_libraries(nvmath | ||
PUBLIC | ||
nvcore | ||
) | ||
|
||
target_compile_definitions(${PROJECT_NAME} | ||
target_compile_definitions(nvmath | ||
PRIVATE | ||
-DNVCORE_EXPORTS | ||
$<$<BOOL:${NVMATH_SHARED}>:-DNVMATH_SHARED=1> | ||
NVCORE_EXPORTS | ||
) | ||
|
||
install(TARGETS ${PROJECT_NAME} LIBRARY | ||
DESTINATION ${CMAKE_INSTALL_LIBDIR} | ||
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ | ||
install(TARGETS nvmath LIBRARY | ||
DESTINATION "${CMAKE_INSTALL_LIBDIR}" | ||
) |
Oops, something went wrong.