CMakeLists.txt: Handle the static library case on Linux

This commit is contained in:
heinrich5991 2017-03-07 13:39:23 +01:00
parent d98abf35db
commit 4389737288
3 changed files with 24 additions and 2 deletions

View file

@ -257,7 +257,9 @@ if(CLIENT)
${LIBS}
${CURL_LIBRARIES}
${FREETYPE_LIBRARIES}
${OGG_LIBRARIES}
${OPUSFILE_LIBRARIES}
${OPUS_LIBRARIES}
${SDL2_LIBRARIES}
${PLATFORM_CLIENT_LIBS}
)

View file

@ -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()

View file

@ -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()