Skip to content

Commit

Permalink
Remove LibSquish from repository.
Browse files Browse the repository at this point in the history
Uses CMake to find system LibSquish instead.
  • Loading branch information
Deledrius committed Oct 26, 2018
1 parent 05a146a commit 1d30f70
Show file tree
Hide file tree
Showing 38 changed files with 41 additions and 6,355 deletions.
11 changes: 7 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES ".*Clang")
endif()
endif()

find_package(LibSquish REQUIRED)
set_package_properties(LibSquish PROPERTIES
URL "https://sourceforge.net/projects/libsquish/"
DESCRIPTION "DXT Compression library"
TYPE REQUIRED
)

find_package(OpenGL REQUIRED)
set_package_properties(OpenGL PROPERTIES
DESCRIPTION "libGL and libGLU libraries"
Expand Down Expand Up @@ -64,9 +71,5 @@ include_directories(${OPENGL_INCLUDE_DIR})
include_directories(${SDL2_INCLUDE_DIRS})
include_directories(${ZLIB_INCLUDE_DIR})

# 3rd party Squish library for DXT codecs
include_directories(libsquish)
add_subdirectory(libsquish)

# The imaginaryMyst application
add_subdirectory(src)
30 changes: 30 additions & 0 deletions cmake/FindLibSquish.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#################################################
#
# Finds the open source DXT Library, Squish
#
# https://sourceforge.net/projects/libsquish/
#
#
# Supplies:
# LIBSQUISH_FOUND
# LIBSQUISH_INCLUDE_DIR
# LIBSQUISH_LIBRARIES
#

# Additional modules
include(FindPackageHandleStandardArgs)
include(SelectLibraryConfigurations)

set(LIBSQUISH_PATH CACHE PATH "Path to libSquish installation")

if(LIBSQUISH_PATH)
file(TO_CMAKE_PATH ${LIBSQUISH_PATH}/include LIBSQUISH_INC_SEARCH )
file(TO_CMAKE_PATH ${LIBSQUISH_PATH}/lib LIBSQUISH_LIB_SEARCH)
endif(LIBSQUISH_PATH)

find_path(LIBSQUISH_INCLUDE_DIR squish.h PATHS ${LIBSQUISH_INC_SEARCH} DOC "Path containing libSquish header")
find_library(LIBSQUISH_LIBRARY_RELEASE NAMES squish libsquish PATHS ${LIBSQUISH_LIB_SEARCH} PATH_SUFFIXES lib DOC "Path to libSquish release library")
find_library(LIBSQUISH_LIBRARY_DEBUG NAMES squishd libsquishd PATHS ${LIBSQUISH_LIB_SEARCH} PATH_SUFFIXES lib DOC "Path to libSquish debug library")

select_library_configurations(LIBSQUISH)
find_package_handle_standard_args(LibSquish REQUIRED_VARS LIBSQUISH_LIBRARY LIBSQUISH_INCLUDE_DIR)
45 changes: 0 additions & 45 deletions libsquish/CMakeLists.txt

This file was deleted.

52 changes: 0 additions & 52 deletions libsquish/ChangeLog

This file was deleted.

223 changes: 0 additions & 223 deletions libsquish/Doxyfile

This file was deleted.

Loading

0 comments on commit 1d30f70

Please sign in to comment.