build scenario changes
This commit is contained in:
parent
5c3a4a592e
commit
2cce5f52f0
5 changed files with 76 additions and 25 deletions
23
cmake/FindFLAC.cmake
Normal file
23
cmake/FindFLAC.cmake
Normal file
|
@ -0,0 +1,23 @@
|
|||
find_path(FLAC_INCLUDE_DIR FLAC/stream_decoder.h)
|
||||
find_library(FLAC_LIBRARIES FLAC NAMES flac)
|
||||
|
||||
if(FLAC_INCLUDE_DIR AND FLAC_LIBRARIES)
|
||||
set(FLAC_FOUND TRUE)
|
||||
endif()
|
||||
|
||||
if(FLAC_FOUND)
|
||||
add_library(FLAC::FLAC SHARED IMPORTED)
|
||||
set_target_properties(FLAC::FLAC PROPERTIES
|
||||
IMPORTED_LOCATION "${FLAC_LIBRARIES}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${FLAC_INCLUDE_DIR}/FLAC"
|
||||
INTERFACE_LINK_LIBRARIES "${FLAC_LIBRARIES}"
|
||||
)
|
||||
if (NOT FLAC_FIND_QUIETLY)
|
||||
message(STATUS "Found FLAC includes: ${FLAC_INCLUDE_DIR}/FLAC")
|
||||
message(STATUS "Found FLAC library: ${FLAC_LIBRARIES}")
|
||||
endif ()
|
||||
else()
|
||||
if (FLAC_FIND_REQUIRED)
|
||||
message(FATAL_ERROR "Could NOT find FLAC development files")
|
||||
endif ()
|
||||
endif()
|
|
@ -1,20 +1,26 @@
|
|||
#copied from here, thank you
|
||||
#https://github.com/sipwise/sems/blob/master/cmake/FindLame.cmake
|
||||
|
||||
FIND_PATH(LAME_INCLUDE_DIR lame/lame.h)
|
||||
FIND_LIBRARY(LAME_LIBRARIES NAMES mp3lame)
|
||||
find_path(LAME_INCLUDE_DIR lame/lame.h)
|
||||
find_library(LAME_LIBRARIES lame NAMES mp3lame)
|
||||
|
||||
IF(LAME_INCLUDE_DIR AND LAME_LIBRARIES)
|
||||
SET(LAME_FOUND TRUE)
|
||||
ENDIF(LAME_INCLUDE_DIR AND LAME_LIBRARIES)
|
||||
if(LAME_INCLUDE_DIR AND LAME_LIBRARIES)
|
||||
set(LAME_FOUND TRUE)
|
||||
endif(LAME_INCLUDE_DIR AND LAME_LIBRARIES)
|
||||
|
||||
IF(LAME_FOUND)
|
||||
IF (NOT Lame_FIND_QUIETLY)
|
||||
MESSAGE(STATUS "Found lame includes: ${LAME_INCLUDE_DIR}/lame/lame.h")
|
||||
MESSAGE(STATUS "Found lame library: ${LAME_LIBRARIES}")
|
||||
ENDIF (NOT Lame_FIND_QUIETLY)
|
||||
ELSE(LAME_FOUND)
|
||||
IF (Lame_FIND_REQUIRED)
|
||||
MESSAGE(FATAL_ERROR "Could NOT find lame development files")
|
||||
ENDIF (Lame_FIND_REQUIRED)
|
||||
ENDIF(LAME_FOUND)
|
||||
if(LAME_FOUND)
|
||||
add_library(LAME::LAME SHARED IMPORTED)
|
||||
set_target_properties(LAME::LAME PROPERTIES
|
||||
IMPORTED_LOCATION "${LAME_LIBRARIES}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${LAME_INCLUDE_DIR}/lame"
|
||||
INTERFACE_LINK_LIBRARIES "${LAME_LIBRARIES}"
|
||||
)
|
||||
if (NOT Lame_FIND_QUIETLY)
|
||||
message(STATUS "Found lame includes: ${LAME_INCLUDE_DIR}/lame")
|
||||
message(STATUS "Found lame library: ${LAME_LIBRARIES}")
|
||||
endif (NOT Lame_FIND_QUIETLY)
|
||||
else(LAME_FOUND)
|
||||
if (Lame_FIND_REQUIRED)
|
||||
message(FATAL_ERROR "Could NOT find lame development files")
|
||||
endif (Lame_FIND_REQUIRED)
|
||||
endif(LAME_FOUND)
|
||||
|
|
24
cmake/FindTAGLIB.cmake
Normal file
24
cmake/FindTAGLIB.cmake
Normal file
|
@ -0,0 +1,24 @@
|
|||
find_path(TAGLIB_INCLUDE_DIR taglib/id3v2tag.h)
|
||||
find_library(TAGLIB_LIBRARIES taglib NAMES TAGLIB tag)
|
||||
|
||||
if(TAGLIB_INCLUDE_DIR AND TAGLIB_LIBRARIES)
|
||||
set(TAGLIB_FOUND TRUE)
|
||||
endif()
|
||||
|
||||
if(TAGLIB_FOUND)
|
||||
add_library(TAGLIB::TAGLIB SHARED IMPORTED)
|
||||
set_target_properties(TAGLIB::TAGLIB PROPERTIES
|
||||
IMPORTED_LOCATION "${TAGLIB_LIBRARIES}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${FLAC_INCLUDE_DIR}/taglib"
|
||||
INTERFACE_LINK_LIBRARIES "${TAGLIB_LIBRARIES}"
|
||||
)
|
||||
if (NOT TAGLIB_FIND_QUIETLY)
|
||||
message(STATUS "Found TAGLIB includes: ${FLAC_INCLUDE_DIR}/taglib")
|
||||
message(STATUS "Found TAGLIB library: ${TAGLIB_LIBRARIES}")
|
||||
endif ()
|
||||
else()
|
||||
if (TAGLIB_FIND_REQUIRED)
|
||||
message(FATAL_ERROR "Could NOT find TAGLIB development files")
|
||||
endif ()
|
||||
endif()
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue