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