mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
CMakeLists.txt: Handle the static library case on Linux
This commit is contained in:
parent
d98abf35db
commit
4389737288
|
@ -257,7 +257,9 @@ if(CLIENT)
|
|||
${LIBS}
|
||||
${CURL_LIBRARIES}
|
||||
${FREETYPE_LIBRARIES}
|
||||
${OGG_LIBRARIES}
|
||||
${OPUSFILE_LIBRARIES}
|
||||
${OPUS_LIBRARIES}
|
||||
${SDL2_LIBRARIES}
|
||||
${PLATFORM_CLIENT_LIBS}
|
||||
)
|
||||
|
|
|
@ -8,10 +8,20 @@ find_path(OGG_INCLUDEDIR ogg.h
|
|||
HINTS ${PC_OGG_INCLUDEDIR} ${PC_OGG_INCLUDE_DIRS}
|
||||
PATHS ${EXTRA_OGG_INCLUDEDIR}
|
||||
)
|
||||
find_library(OGG_LIBRARY
|
||||
NAMES ogg
|
||||
HINTS ${PC_OGG_LIBDIR} ${PC_OGG_LIBRARY_DIRS}
|
||||
PATHS ${EXTRA_OGG_LIBDIR}
|
||||
)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Ogg DEFAULT_MSG OGG_INCLUDEDIR)
|
||||
|
||||
mark_as_advanced(OGG_INCLUDEDIR)
|
||||
mark_as_advanced(OGG_INCLUDEDIR OGG_LIBRARY)
|
||||
|
||||
set(OGG_INCLUDE_DIRS ${OGG_INCLUDEDIR})
|
||||
if(OGG_LIBRARY)
|
||||
set(OGG_LIBRARIES ${OGG_LIBRARY})
|
||||
else()
|
||||
set(OGG_LIBRARIES)
|
||||
endif()
|
||||
|
|
|
@ -7,10 +7,20 @@ find_path(OPUS_INCLUDEDIR opus.h
|
|||
HINTS ${PC_OPUS_INCLUDEDIR} ${PC_OPUS_INCLUDE_DIRS}
|
||||
PATHS ${EXTRA_OPUS_INCLUDEDIR}
|
||||
)
|
||||
find_library(OPUS_LIBRARY
|
||||
NAMES opus
|
||||
HINTS ${PC_OPUS_LIBDIR} ${PC_OPUS_LIBRARY_DIRS}
|
||||
PATHS ${EXTRA_OPUS_LIBDIR}
|
||||
)
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(Opus DEFAULT_MSG OPUS_INCLUDEDIR)
|
||||
|
||||
mark_as_advanced(OPUS_INCLUDEDIR)
|
||||
mark_as_advanced(OPUS_INCLUDEDIR OPUS_LIBRARY)
|
||||
|
||||
set(OPUS_INCLUDE_DIRS ${OPUS_INCLUDEDIR})
|
||||
if(OPUS_LIBRARY)
|
||||
set(OPUS_LIBRARIES ${OPUS_LIBRARY})
|
||||
else()
|
||||
set(OPUS_LIBRARIES)
|
||||
endif()
|
||||
|
|
Loading…
Reference in a new issue