You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
991 B
CMake
36 lines
991 B
CMake
FIND_PATH(CUEFILE_INCLUDE_DIR cuetools/cuefile.h
|
|
${libmpc_SOURCE_DIR}/../libcuefile/include
|
|
)
|
|
|
|
FIND_LIBRARY(CUEFILE_LIBRARY NAMES cuefile PATHS
|
|
${CUEFILE_INCLUDE_DIR}/../src
|
|
)
|
|
|
|
if(CUEFILE_INCLUDE_DIR AND CUEFILE_LIBRARY)
|
|
message(STATUS "Building mpcchap with cuefile support")
|
|
include_directories(${libmpc_SOURCE_DIR}/include)
|
|
include_directories(${CUEFILE_INCLUDE_DIR})
|
|
|
|
link_directories(${libmpc_BINARY_DIR}/libmpcdec)
|
|
link_directories(${libmpc_BINARY_DIR}/libmpcenc)
|
|
|
|
add_executable(mpcchap mpcchap.c dictionary.c iniparser.c ${libmpc_SOURCE_DIR}/common/tags.c)
|
|
|
|
if(SHARED)
|
|
target_link_libraries(mpcchap mpcdec)
|
|
else()
|
|
target_link_libraries(mpcchap mpcdec_static)
|
|
endif()
|
|
|
|
target_link_libraries(mpcchap mpcenc_static)
|
|
target_link_libraries(mpcchap ${CUEFILE_LIBRARY})
|
|
|
|
if(NOT MSVC)
|
|
target_link_libraries(mpcchap m)
|
|
endif()
|
|
|
|
install(TARGETS mpcchap RUNTIME DESTINATION bin)
|
|
else()
|
|
message(STATUS "Skipping mpcchap (libcuefile not found)")
|
|
endif()
|