Patched library garbage
This commit is contained in:
parent
0507ff6d28
commit
c8e505b302
@ -33,6 +33,7 @@ set(INSTALL_INC_DIR "${CMAKE_INSTALL_PREFIX}/include" CACHE PATH "Installation d
|
||||
# Compilation option
|
||||
option(RSPTERRAIN_SHARED "Build shared lib" ON)
|
||||
option(RSPTERRAIN_STATIC "Build static lib" ON)
|
||||
option(BUILD_TOOLS "Build lib tools" ON)
|
||||
|
||||
|
||||
# Push compile infos to source
|
||||
@ -51,9 +52,6 @@ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/lib)
|
||||
unset(RSE_TERRAIN_TARGETS_LIST)
|
||||
add_subdirectory(RSPTerrainLib)
|
||||
add_subdirectory(RSETerrain)
|
||||
if(BUILD_TOOLS)
|
||||
set(RSE_TERRAIN_TARGETS_LIST rse-terrain)
|
||||
endif()
|
||||
if(RSPTERRAIN_SHARED)
|
||||
list(APPEND RSE_TERRAIN_TARGETS_LIST rsp-terrain-lib)
|
||||
endif()
|
||||
@ -66,6 +64,9 @@ if(NOT RSE_TERRAIN_TARGETS_LIST)
|
||||
"Please enable at least one of the following options: "
|
||||
"RSPTERRAIN_STATIC, RSPTERRAIN_SHARED")
|
||||
endif()
|
||||
if(BUILD_TOOLS)
|
||||
list(APPEND RSE_TERRAIN_TARGETS_LIST rse-terrain)
|
||||
endif()
|
||||
|
||||
|
||||
# GPG signature custom command
|
||||
|
@ -10,12 +10,11 @@
|
||||
include(CheckIncludeFile)
|
||||
include(CheckCSourceCompiles)
|
||||
|
||||
add_definitions(-DCONF_NO_GL) # Used for obj-lib to not compile GL part
|
||||
|
||||
if(BUILD_TOOLS)
|
||||
# Import needed packages and references their include path
|
||||
find_package(PNG 1.6.37 REQUIRED)
|
||||
include_directories(${PNG_INCLUDE_DIR})
|
||||
find_package(GLEW REQUIRED) # Enable when GL rendering is ready
|
||||
find_package(GLEW REQUIRED)
|
||||
include_directories(${GLEW_INCLUDE_DIR})
|
||||
|
||||
|
||||
@ -50,3 +49,4 @@ if(RSPTERRAIN_SHARED)
|
||||
elseif(RSPTERRAIN_STATIC)
|
||||
target_link_libraries(rse-terrain PRIVATE rsp-terrain-libstatic ${PNG_LIBRARIES} ${GLEW_LIBRARIES} ${AUX_LIBS})
|
||||
endif()
|
||||
endif()
|
||||
|
@ -46,17 +46,24 @@ typedef union u_rspterrain_parameters {
|
||||
// Lib's structure definitions
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef MEMFILE
|
||||
#ifndef MEMFILE_DEF
|
||||
typedef char* MEMFILE;
|
||||
#define MEMFILE_DEF
|
||||
#endif
|
||||
#ifndef HEIGHTMAP_T
|
||||
|
||||
#ifndef HEIGHTMAP_T_DEF
|
||||
typedef unsigned char** HEIGHTMAP_T;
|
||||
#define HEIGHTMAP_T_DEF
|
||||
#endif
|
||||
#ifndef T_VECTOR3
|
||||
|
||||
#ifndef T_VECTOR3_DEF
|
||||
typedef struct vector3 { float x,y,z; } T_VECTOR3;
|
||||
#define T_VECTOR3_DEF
|
||||
#endif
|
||||
#ifndef T_VERTEX
|
||||
|
||||
#ifndef T_VERTEX_DEF
|
||||
typedef T_VECTOR3 T_VERTEX;
|
||||
#define T_VERTEX_DEF
|
||||
#endif
|
||||
|
||||
typedef struct rspterrain_heightmap {
|
||||
|
Loading…
x
Reference in New Issue
Block a user