mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-27 01:26:30 +00:00
Changed: #842 panolpy_maker finds libsquish, OpenAL driver finds EFX-Util on Windows.
This commit is contained in:
parent
fba74a8133
commit
261913e90a
4 changed files with 110 additions and 2 deletions
50
code/nel/CMakeModules/FindEFXUtil.cmake
Normal file
50
code/nel/CMakeModules/FindEFXUtil.cmake
Normal file
|
@ -0,0 +1,50 @@
|
||||||
|
# - Locate EFX-Util library
|
||||||
|
# This module defines
|
||||||
|
# EFXUTIL_LIBRARY, the library to link against
|
||||||
|
# EFXUTIL_FOUND, if false, do not try to link to EFX-Util
|
||||||
|
# EFXUTIL_INCLUDE_DIR, where to find headers.
|
||||||
|
|
||||||
|
IF(EFXUTIL_LIBRARY AND EFXUTIL_INCLUDE_DIR)
|
||||||
|
# in cache already
|
||||||
|
SET(EFXUTIL_FIND_QUIETLY TRUE)
|
||||||
|
ENDIF(EFXUTIL_LIBRARY AND EFXUTIL_INCLUDE_DIR)
|
||||||
|
|
||||||
|
|
||||||
|
FIND_PATH(EFXUTIL_INCLUDE_DIR
|
||||||
|
EFX-Util.h
|
||||||
|
PATHS
|
||||||
|
$ENV{EFXUTIL_DIR}/include
|
||||||
|
/usr/local/include
|
||||||
|
/usr/include
|
||||||
|
/sw/include
|
||||||
|
/opt/local/include
|
||||||
|
/opt/csw/include
|
||||||
|
/opt/include
|
||||||
|
PATH_SUFFIXES AL
|
||||||
|
)
|
||||||
|
|
||||||
|
FIND_LIBRARY(EFXUTIL_LIBRARY
|
||||||
|
NAMES EFX-Util efxutil libefxutil
|
||||||
|
PATHS
|
||||||
|
$ENV{EFXUTIL_DIR}/lib
|
||||||
|
/usr/local/lib
|
||||||
|
/usr/lib
|
||||||
|
/usr/local/X11R6/lib
|
||||||
|
/usr/X11R6/lib
|
||||||
|
/sw/lib
|
||||||
|
/opt/local/lib
|
||||||
|
/opt/csw/lib
|
||||||
|
/opt/lib
|
||||||
|
/usr/freeware/lib64
|
||||||
|
)
|
||||||
|
|
||||||
|
IF(EFXUTIL_LIBRARY AND EFXUTIL_INCLUDE_DIR)
|
||||||
|
SET(EFXUTIL_FOUND "YES")
|
||||||
|
IF(NOT EFXUTIL_FIND_QUIETLY)
|
||||||
|
MESSAGE(STATUS "Found EFX-Util: ${EFXUTIL_LIBRARY}")
|
||||||
|
ENDIF(NOT EFXUTIL_FIND_QUIETLY)
|
||||||
|
ELSE(EFXUTIL_LIBRARY AND EFXUTIL_INCLUDE_DIR)
|
||||||
|
IF(NOT EFXUTIL_FIND_QUIETLY)
|
||||||
|
MESSAGE(STATUS "Warning: Unable to find EFX-Util!")
|
||||||
|
ENDIF(NOT EFXUTIL_FIND_QUIETLY)
|
||||||
|
ENDIF(EFXUTIL_LIBRARY AND EFXUTIL_INCLUDE_DIR)
|
51
code/nel/CMakeModules/FindSquish.cmake
Normal file
51
code/nel/CMakeModules/FindSquish.cmake
Normal file
|
@ -0,0 +1,51 @@
|
||||||
|
#
|
||||||
|
# Find the LibSquish includes and library
|
||||||
|
#
|
||||||
|
# This module defines
|
||||||
|
# SQUISH_INCLUDE_DIR, where to find squish.h
|
||||||
|
# SQUISH_LIBRARY, where to find the Squish library.
|
||||||
|
# SQUISH_FOUND, If false, do not try to use Squish.
|
||||||
|
|
||||||
|
# also defined, but not for general use are
|
||||||
|
IF(SQUISH_LIBRARY AND SQUISH_INCLUDE_DIR)
|
||||||
|
# in cache already
|
||||||
|
SET(SQUISH_FIND_QUIETLY TRUE)
|
||||||
|
ENDIF(SQUISH_LIBRARY AND SQUISH_INCLUDE_DIR)
|
||||||
|
|
||||||
|
FIND_PATH(SQUISH_INCLUDE_DIR
|
||||||
|
squish.h
|
||||||
|
PATHS
|
||||||
|
/usr/local/include
|
||||||
|
/usr/include
|
||||||
|
/sw/include
|
||||||
|
/opt/local/include
|
||||||
|
/opt/csw/include
|
||||||
|
/opt/include
|
||||||
|
PATH_SUFFIXES cppunit
|
||||||
|
)
|
||||||
|
|
||||||
|
FIND_LIBRARY(SQUISH_LIBRARY
|
||||||
|
squish
|
||||||
|
PATHS
|
||||||
|
/usr/local/lib
|
||||||
|
/usr/lib
|
||||||
|
/usr/local/X11R6/lib
|
||||||
|
/usr/X11R6/lib
|
||||||
|
/sw/lib
|
||||||
|
/opt/local/lib
|
||||||
|
/opt/csw/lib
|
||||||
|
/opt/lib
|
||||||
|
/usr/freeware/lib64
|
||||||
|
)
|
||||||
|
|
||||||
|
IF(SQUISH_LIBRARY AND SQUISH_INCLUDE_DIR)
|
||||||
|
SET(SQUISH_FOUND "YES")
|
||||||
|
IF(NOT SQUISH_FIND_QUIETLY)
|
||||||
|
MESSAGE(STATUS "Found Squish: ${SQUISH_LIBRARY}")
|
||||||
|
ENDIF(NOT SQUISH_FIND_QUIETLY)
|
||||||
|
ELSE(SQUISH_LIBRARY AND SQUISH_INCLUDE_DIR)
|
||||||
|
IF(NOT SQUISH_FIND_QUIETLY)
|
||||||
|
MESSAGE(STATUS "Warning: Unable to find Squish!")
|
||||||
|
ENDIF(NOT SQUISH_FIND_QUIETLY)
|
||||||
|
ENDIF(SQUISH_LIBRARY AND SQUISH_INCLUDE_DIR)
|
||||||
|
|
|
@ -8,6 +8,11 @@ SET_TARGET_PROPERTIES(nel_drv_openal PROPERTIES VERSION ${NL_VERSION})
|
||||||
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
|
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
|
||||||
|
|
||||||
IF(WIN32)
|
IF(WIN32)
|
||||||
|
# Find and include EFX-Util on Windows.
|
||||||
|
FIND_PACKAGE(EFXUtil)
|
||||||
|
INCLUDE_DIRECTORIES(${EFXUTIL_INCLUDE_DIR})
|
||||||
|
TARGET_LINK_LIBRARIES(nel_drv_openal ${EFXUTIL_LIBRARY})
|
||||||
|
|
||||||
SET_TARGET_PROPERTIES(nel_drv_openal PROPERTIES COMPILE_FLAGS "/Yustdopenal.h")
|
SET_TARGET_PROPERTIES(nel_drv_openal PROPERTIES COMPILE_FLAGS "/Yustdopenal.h")
|
||||||
SET_SOURCE_FILES_PROPERTIES(stdopenal.cpp PROPERTIES COMPILE_FLAGS "/Ycstdopenal.h")
|
SET_SOURCE_FILES_PROPERTIES(stdopenal.cpp PROPERTIES COMPILE_FLAGS "/Ycstdopenal.h")
|
||||||
SET_TARGET_PROPERTIES(nel_drv_openal PROPERTIES
|
SET_TARGET_PROPERTIES(nel_drv_openal PROPERTIES
|
||||||
|
|
|
@ -2,8 +2,10 @@ FILE(GLOB SRC *.cpp *.h ../s3tc_compressor_lib/*.h ../s3tc_compressor_lib/*.cpp)
|
||||||
|
|
||||||
ADD_EXECUTABLE(panoply_maker ${SRC})
|
ADD_EXECUTABLE(panoply_maker ${SRC})
|
||||||
|
|
||||||
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${S3TC_INCLUDE_DIR})
|
FIND_PACKAGE(Squish REQUIRED)
|
||||||
TARGET_LINK_LIBRARIES(panoply_maker ${LIBXML2_LIBRARIES} ${PLATFORM_LINKFLAGS} ${S3TC_LIBRARY} nelmisc nel3d)
|
|
||||||
|
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${SQUISH_INCLUDE_DIR})
|
||||||
|
TARGET_LINK_LIBRARIES(panoply_maker ${LIBXML2_LIBRARIES} ${PLATFORM_LINKFLAGS} ${SQUISH_LIBRARY} nelmisc nel3d)
|
||||||
IF(WIN32)
|
IF(WIN32)
|
||||||
SET_TARGET_PROPERTIES(panoply_maker PROPERTIES
|
SET_TARGET_PROPERTIES(panoply_maker PROPERTIES
|
||||||
LINK_FLAGS "/NODEFAULTLIB:libcmt /NODEFAULTLIB:libc"
|
LINK_FLAGS "/NODEFAULTLIB:libcmt /NODEFAULTLIB:libc"
|
||||||
|
|
Loading…
Reference in a new issue