Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
CMAKE_MINIMUM_REQUIRED(VERSION 3.5)

PROJECT(LibSL)

Expand Down Expand Up @@ -28,6 +28,7 @@ OPTION(LIBSL_USE_GLFW "Use glfw" OFF)
OPTION(LIBSL_USE_GLUT "Use glut" ON)
OPTION(LIBSL_BUILD_GLFW "Build glfw from source" OFF)
OPTION(LIBSL_POWER_USER "Power user mode (reserved, do not use)" OFF)
OPTION(LIBSL_BUILD_TESTS "Build LibSL tests" ON)

ADD_DEFINITIONS(-DANDROID)

Expand All @@ -54,6 +55,7 @@ OPTION(LIBSL_USE_GLFW "Use glfw" OFF)
OPTION(LIBSL_USE_GLUT "Use glut" ON)
OPTION(LIBSL_BUILD_GLFW "Build glfw from source" OFF)
OPTION(LIBSL_POWER_USER "Power user mode (reserved, do not use)" OFF)
OPTION(LIBSL_BUILD_TESTS "Build LibSL tests" ON)

else(EMSCRIPTEN)

Expand Down Expand Up @@ -115,6 +117,7 @@ OPTION(LIBSL_BUILD_GLUX "Build gluX" ON)
OPTION(LIBSL_BUILD_LIBARCHIVE "Build libarchive" OFF)
OPTION(LIBSL_USE_GLUX "Use gluX with LibSL_gl" ON)
OPTION(LIBSL_POWER_USER "Power user mode (reserved, do not use)" OFF)
OPTION(LIBSL_BUILD_TESTS "Build LibSL tests" ON)

endif(WASI)

Expand Down Expand Up @@ -174,7 +177,7 @@ INCLUDE_DIRECTORIES(
${CMAKE_CURRENT_SOURCE_DIR}/src/libs/src/SQLite
${CMAKE_CURRENT_SOURCE_DIR}/src/libs/src/qhull/src/libqhull_r
${CMAKE_CURRENT_SOURCE_DIR}/src/libs/src/rply
${CMAKE_CURRENT_SOURCE_DIR}/src/libs/src/glfw/include
${CMAKE_CURRENT_SOURCE_DIR}/src/libs/src/glfw/include
)

if (LIBSL_ENABLE_NVIDIA_CG)
Expand Down
2 changes: 1 addition & 1 deletion libsl-config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ IF (NOT TARGET AntTweakBar)
${OPENGL_LIBRARIES}
${X11_LIBRARIES}
)
ENDIF(APPLE)
ENDIF(NOT APPLE)
#IF(APPLE)
# ADD_DEFINITIONS(-D_MACOSX)
# ADD_DEFINITIONS(-D__PLACEMENT_NEW_INLINE)
Expand Down
4 changes: 2 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
CMAKE_MINIMUM_REQUIRED(VERSION 3.5)

# MESSAGE(STATUS "[in LibSL/src/]")

Expand Down Expand Up @@ -27,7 +27,7 @@ endif(LIBSL_BUILD_TOOLS)

if (NOT WASI)
ADD_SUBDIRECTORY(tests)
endif(WASI)
endif(NOT WASI)

if(LIBSL_BUILD_TUTORIALS)
ADD_SUBDIRECTORY(tutorials)
Expand Down
4 changes: 0 additions & 4 deletions src/LibSL/Image/ImageFormat_PNG.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,6 @@ void NAMESPACE::ImageFormat_PNG::save(const char *fname,const NAMESPACE::Image *

//---------------------------------------------------------------------------

#ifndef EMSCRIPTEN // SL 2025-04-17 hotfix as this result in Emscripten compilation error

template <typename TChar>
void write_data_stream(png_structp png_ptr, png_bytep data, png_size_t length)
{
Expand Down Expand Up @@ -313,8 +311,6 @@ void NAMESPACE::ImageFormat_PNG::save<std::ostream::char_type>(
const NAMESPACE::Image *img,
const std::map<std::string,std::string>& key_value_text) const;

#endif

//---------------------------------------------------------------------------

void NAMESPACE::ImageFormat_PNG::save(const char *fname, const NAMESPACE::Image *img) const
Expand Down
3 changes: 0 additions & 3 deletions src/LibSL/Image/ImageFormat_PNG.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,10 @@ namespace LibSL {
void save(const char*, const Image*, const std::map<std::string,std::string>& key_value_text) const;
Image* load(const char*, std::map<std::string, std::string>& _key_value_text) const;

#ifndef EMSCRIPTEN // SL 2025-04-17 hotfix as this result in Emscripten compilation error
// NS 2023-01-12: new interface to save in streams
template<typename TChar>
void save(std::basic_ostream<TChar>&,
const Image*,
const std::map<std::string,std::string>& key_value_text) const;
#endif
};

} //namespace LibSL::Image
Expand Down
2 changes: 1 addition & 1 deletion src/build/UseCXX11.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
################################################################################
CMake_Minimum_Required(VERSION 2.6.3)
CMake_Minimum_Required(VERSION 3.5)
################################################################################

# The method used here is a bit involved and incomplete, so feel free to improve it!
Expand Down
2 changes: 1 addition & 1 deletion src/build/UseCXX11_clang.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
################################################################################
CMake_Minimum_Required(VERSION 2.8.0)
CMake_Minimum_Required(VERSION 3.5)
################################################################################

# TODO: Set C Compiler Flags
Expand Down
2 changes: 1 addition & 1 deletion src/libs/src/OpenNL/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# CMake version checks
######################################
if(COMMAND cmake_minimum_required)
cmake_minimum_required(VERSION 2.4)
cmake_minimum_required(VERSION 3.5)
endif(COMMAND cmake_minimum_required)

if(COMMAND cmake_policy)
Expand Down
2 changes: 1 addition & 1 deletion src/libs/src/anttweakbar/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
CMAKE_MINIMUM_REQUIRED(VERSION 3.5)

PROJECT(AntTweakBar)

Expand Down
2 changes: 1 addition & 1 deletion src/libs/src/glfw/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.0)
cmake_minimum_required(VERSION 3.5)

project(GLFW VERSION 3.3.2 LANGUAGES C)

Expand Down
2 changes: 1 addition & 1 deletion src/libs/src/glux/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
CMAKE_MINIMUM_REQUIRED(VERSION 3.5)
PROJECT(glux)

OPTION(GLUX_BUILD_SAMPLES "Build gluX sample programs" OFF)
Expand Down
2 changes: 1 addition & 1 deletion src/libs/src/hashlibpp/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
CMAKE_MINIMUM_REQUIRED(VERSION 3.5)
PROJECT(hashlibpp)

SET(LIBH_SOURCES
Expand Down
2 changes: 1 addition & 1 deletion src/libs/src/jpeg/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
CMAKE_MINIMUM_REQUIRED(VERSION 3.5)
PROJECT(jpeg)

SET(LIBJPEG_SOURCES
Expand Down
2 changes: 1 addition & 1 deletion src/libs/src/lib3ds/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
CMAKE_MINIMUM_REQUIRED(VERSION 3.5)
PROJECT(3ds)

SET(LIB3DS_SOURCES
Expand Down
2 changes: 1 addition & 1 deletion src/libs/src/newmat/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
CMAKE_MINIMUM_REQUIRED(VERSION 3.5)
PROJECT(newmat)

SET(NEWMAT_SOURCES
Expand Down
2 changes: 1 addition & 1 deletion src/libs/src/png/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
CMAKE_MINIMUM_REQUIRED(VERSION 3.5)
PROJECT(png)

SET(LIBPNG_SOURCES
Expand Down
2 changes: 1 addition & 1 deletion src/libs/src/qhull/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
# $DateTime: 2012/02/21 22:41:40 $$Author: bbarber $

project(qhull)
cmake_minimum_required(VERSION 2.6)
cmake_minimum_required(VERSION 3.5)

# Define qhull_VERSION in CMakeLists.txt, Makefile, qhull-exports.def, qhull_p-exports.def, and qhull-warn.pri
string(REGEX REPLACE ".* ([0-9]+) .*"
Expand Down
2 changes: 1 addition & 1 deletion src/libs/src/tinyxml/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
CMAKE_MINIMUM_REQUIRED(VERSION 3.5)
PROJECT(tinyxml)

SET(TINYXML_SOURCES
Expand Down
14 changes: 9 additions & 5 deletions src/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
# CMAKE_MINIMUM_REQUIRED(VERSION 3.5)
PROJECT(TestLibSL)

INCLUDE(${LibSL_DIR}/libsl-config.cmake)
Expand Down Expand Up @@ -60,11 +60,15 @@ endif(LIBSL_BUILD_GL)
if(LIBSL_BUILD_GL4CORE)
ADD_EXECUTABLE(test_sh_gl4core test_sh_gl4core.cpp test_sh_gl4core.fp test_sh_gl4core.vp test_sh_gl4core.h)
TARGET_LINK_LIBRARIES(test_sh_gl4core LibSL LibSL_gl4core)
SET_TARGET_PROPERTIES(test_sh_gl4core PROPERTIES COMPILE_DEFINITIONS "USE_GLUX;OPENGL4;OPENGLCORE")
SET_TARGET_PROPERTIES(test_sh_gl4core PROPERTIES COMPILE_DEFINITIONS "USE_GLUX")
endif(LIBSL_BUILD_GL4CORE)

IF(LIBSL_USE_INSTALL_PREFIX)
SET(LIBSL_INSTALL_BIN_DIR "bin")
ELSE()
SET(LIBSL_INSTALL_BIN_DIR "${CMAKE_SOURCE_DIR}/bin")
ENDIF()

INSTALL(TARGETS TestLibSL
RUNTIME DESTINATION ${CMAKE_SOURCE_DIR}/bin
LIBRARY DESTINATION ${LIBSL_INSTALL_LIB_DIR}
ARCHIVE DESTINATION ${LIBSL_INSTALL_LIB_DIR}
RUNTIME DESTINATION ${LIBSL_INSTALL_BIN_DIR}
)
Loading