MESSAGE(${BUILD_ARGS})
endif()
+if(NOT ADDONS_TO_BUILD)
+ set(ADDONS_TO_BUILD "all")
+else()
+ message(STATUS "Building following addons: ${ADDONS_TO_BUILD}")
+ separate_arguments(ADDONS_TO_BUILD)
+endif()
+
if(NOT WIN32)
# copy the xbmc-prepare-env.cmake script to the depends path so that we can include it
file(COPY ${XBMCROOT}/project/cmake/scripts/common/xbmc-prepare-env.cmake DESTINATION ${DEPENDS_PATH}/lib/xbmc)
list(GET def 1 url)
list(GET def 2 revision)
- # make sure the output directory is clean
- if(EXISTS "${CMAKE_INSTALL_PREFIX}/${id}")
- file(REMOVE_RECURSE "${CMAKE_INSTALL_PREFIX}/${id}/")
- endif()
+ list(FIND ADDONS_TO_BUILD ${id} idx)
+ if(idx GREATER -1 OR ADDONS_TO_BUILD STREQUAL "all")
+ # make sure the output directory is clean
+ if(EXISTS "${CMAKE_INSTALL_PREFIX}/${id}")
+ file(REMOVE_RECURSE "${CMAKE_INSTALL_PREFIX}/${id}/")
+ endif()
- # add the addon as an external project for automatic building
- externalproject_add(${id}
+ # add the addon as an external project for automatic building
+ externalproject_add(${id}
GIT_REPOSITORY ${url}/${id}
GIT_TAG ${revision}
INSTALL_DIR "${CMAKE_INSTALL_PREFIX}"
CMAKE_ARGS ${BUILD_ARGS}
)
+ endif()
endforeach()
The buildsystem uses the following variables (which can be passed into it when
executing cmake with the -D<variable-name>=<value> option) to e.g. access
specific paths:
+ * ADDONS_TO_BUILD is a quoted, space delimited list of <addon-id>s that
+ you want to build (default is "all").
* CMAKE_BUILD_TYPE specifies the type of the build. This can be either "Debug"
or "Release" (default is "Release").
* CMAKE_INSTALL_PREFIX points to the directory where the built addons and their
-include ../../Makefile.include
-LIBNAME = xbmc-audioencoder-addons
-
+ADDONS = "audioencoder.flac audioencoder.lame audioencoder.vorbis audioencoder.wav"
ifeq ($(PLATFORM),)
PLATFORM = native
endif
mkdir -p $(PLATFORM); \
cd $(PLATFORM); \
$(CMAKE) -DCMAKE_INSTALL_PREFIX=$(INSTALL_PREFIX) -DCMAKE_PREFIX_PATH=$(PREFIX) $(CMAKE_EXTRA) \
- ../../../../../project/cmake/addons/ ;\
+ -DADDONS_TO_BUILD=$(ADDONS) ../../../../../project/cmake/addons/ ;\
$(MAKE);
touch $@