CMAKE_MINIMUM_REQUIRED(VERSION 2.8) PROJECT(esplusplayer) SET(description "new multimedia player, object-oriented model") SET(PC_NAME "esplusplayer") SET(PC_LDFLAGS "-lesplusplayer") SET(PC_CFLAGS "-I/usr/include/esplusplayer_capi") SET(INC_DIR ${PROJECT_SOURCE_DIR}/include/) INCLUDE_DIRECTORIES(${INC_DIR}) SET(CMAKE_INSTALL_PREFIX /usr) SET(PREFIX ${CMAKE_INSTALL_PREFIX}) CONFIGURE_FILE(esplusplayer.pc.in esplusplayer.pc @ONLY ) INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/esplusplayer.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig) ADD_SUBDIRECTORY(src) OPTION(ESPLUSPLAYER_BUILD_UT "Build esplusplayer ut codes" OFF) IF(ESPLUSPLAYER_BUILD_UT) ADD_SUBDIRECTORY(ut) ENDIF(ESPLUSPLAYER_BUILD_UT) ADD_SUBDIRECTORY(test) IF(UNIX) ADD_CUSTOM_TARGET (distclean @echo cleaning for source distribution) ADD_CUSTOM_COMMAND( DEPENDS clean COMMENT "distribution clean" COMMAND find ARGS . -not -name config.cmake -and \( -name tester.c -or -name Testing -or -name CMakeFiles -or -name cmake.depends -or -name cmake.check_depends -or -name CMakeCache.txt -or -name cmake.check_cache -or -name *.cmake -or -name Makefile -or -name core -or -name core.* -or -name gmon.out -or -name install_manifest.txt -or -name *.pc -or -name *~ \) | grep -v TC | xargs rm -rf TARGET distclean VERBATIM ) ENDIF(UNIX) MESSAGE( STATUS "PROJECT_SOURCE_DIR: " ${PROJECT_SOURCE_DIR} ) MESSAGE( STATUS "CMAKE_CURRENT_SOURCE_DIR: " ${CMAKE_CURRENT_SOURCE_DIR} ) MESSAGE( STATUS "LIB_INSTALL_DIR: " ${LIB_INSTALL_DIR} ) MESSAGE( STATUS "INC_DIR: " ${INC_DIR} )