mirror of
https://github.com/fabiangreffrath/woof.git
synced 2025-08-03 20:57:55 -04:00
cmake: delete unused code, cosmetic changes
This commit is contained in:
parent
4463f86dea
commit
ab708171f3
@ -140,18 +140,4 @@ if(SDL2_FOUND)
|
||||
set_target_properties(SDL2::SDL2main PROPERTIES
|
||||
IMPORTED_LOCATION "${SDL2_MAIN_LIBRARY}")
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
# On Windows, we need to figure out the location of our library files
|
||||
# so we can copy and package them.
|
||||
get_filename_component(SDL2_DLL_DIR "${SDL2_LIBRARY}" DIRECTORY)
|
||||
if(EXISTS "${SDL2_DLL_DIR}/SDL2.dll")
|
||||
set(SDL2_DLL_DIR "${SDL2_DLL_DIR}" CACHE INTERNAL "")
|
||||
elseif(EXISTS "${SDL2_DLL_DIR}/../bin/SDL2.dll")
|
||||
get_filename_component(SDL2_DLL_DIR "${SDL2_DLL_DIR}/../bin" REALPATH)
|
||||
set(SDL2_DLL_DIR "${SDL2_DLL_DIR}" CACHE INTERNAL "")
|
||||
else()
|
||||
message(ERROR "Can't find SDL2 dynamic library directory.")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
@ -106,18 +106,4 @@ if(SDL2_NET_FOUND)
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${SDL2_NET_INCLUDE_DIR}"
|
||||
INTERFACE_LINK_LIBRARIES SDL2::SDL2
|
||||
IMPORTED_LOCATION "${SDL2_NET_LIBRARY}")
|
||||
|
||||
if(WIN32)
|
||||
# On Windows, we need to figure out the location of our library files
|
||||
# so we can copy and package them.
|
||||
get_filename_component(SDL2_NET_DLL_DIR "${SDL2_NET_LIBRARY}" DIRECTORY)
|
||||
if(EXISTS "${SDL2_NET_DLL_DIR}/SDL2_net.dll")
|
||||
set(SDL2_NET_DLL_DIR "${SDL2_NET_DLL_DIR}" CACHE INTERNAL "")
|
||||
elseif(EXISTS "${SDL2_NET_DLL_DIR}/../bin/SDL2_net.dll")
|
||||
get_filename_component(SDL2_NET_DLL_DIR "${SDL2_NET_DLL_DIR}/../bin" REALPATH)
|
||||
set(SDL2_NET_DLL_DIR "${SDL2_NET_DLL_DIR}" CACHE INTERNAL "")
|
||||
else()
|
||||
message(ERROR "Can't find SDL2_net dynamic library directory.")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
@ -4,7 +4,7 @@
|
||||
# SNDFILE_LIBRARY
|
||||
#
|
||||
# Environment variables used:
|
||||
# SNDFILE_ROOT
|
||||
# SNDFILE_DIR
|
||||
|
||||
find_package(PkgConfig QUIET)
|
||||
pkg_check_modules(PC_SndFile QUIET sndfile)
|
||||
@ -15,7 +15,7 @@ find_path(SndFile_INCLUDE_DIR sndfile.h
|
||||
HINTS
|
||||
${PC_SndFile_INCLUDEDIR}
|
||||
${PC_SndFile_INCLUDE_DIRS}
|
||||
${SndFile_ROOT})
|
||||
${SNDFILE_DIR})
|
||||
|
||||
find_file(SndFile_DLL
|
||||
NAMES sndfile.dll libsndfile.dll libsndfile-1.dll
|
||||
@ -27,7 +27,7 @@ find_library(SndFile_LIBRARY
|
||||
HINTS
|
||||
${PC_SndFile_LIBDIR}
|
||||
${PC_SndFile_LIBRARY_DIRS}
|
||||
${SndFile_ROOT})
|
||||
${SNDFILE_DIR})
|
||||
|
||||
if(SndFile_DLL OR SndFile_LIBRARY MATCHES ".so|.dylib")
|
||||
set(_sndfile_library_type SHARED)
|
||||
|
@ -11,9 +11,9 @@ find_package_handle_standard_args(libxmp
|
||||
)
|
||||
|
||||
if(libxmp_FOUND)
|
||||
if(NOT TARGET libxmp::xmp_shared)
|
||||
add_library(libxmp::xmp_shared UNKNOWN IMPORTED)
|
||||
set_target_properties(libxmp::xmp_shared PROPERTIES
|
||||
if(NOT TARGET libxmp::xmp)
|
||||
add_library(libxmp::xmp UNKNOWN IMPORTED)
|
||||
set_target_properties(libxmp::xmp PROPERTIES
|
||||
IMPORTED_LOCATION "${libxmp_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${libxmp_INCLUDE_PATH}")
|
||||
endif()
|
||||
|
@ -145,7 +145,9 @@ endif()
|
||||
if(libxmp_FOUND)
|
||||
list(APPEND WOOF_SOURCES i_xmp.c)
|
||||
list(APPEND WOOF_LIBRARIES
|
||||
$<IF:$<TARGET_EXISTS:libxmp::xmp_shared>,libxmp::xmp_shared,libxmp::xmp_static>)
|
||||
$<IF:$<TARGET_EXISTS:libxmp::xmp>,libxmp::xmp,
|
||||
$<IF:$<TARGET_EXISTS:libxmp::xmp_shared>,libxmp::xmp_shared,
|
||||
libxmp::xmp_static>>)
|
||||
endif()
|
||||
|
||||
# Standard target definition
|
||||
|
Loading…
x
Reference in New Issue
Block a user