Fixed prebuilt fetching, Snowglobe style
This commit is contained in:
@@ -132,27 +132,25 @@ endif (SERVER)
|
|||||||
|
|
||||||
# Configure prebuilt binary download. This must be done last so that
|
# Configure prebuilt binary download. This must be done last so that
|
||||||
# all subdirectories have a chance to list the packages they need.
|
# all subdirectories have a chance to list the packages they need.
|
||||||
if(NOT STANDALONE)
|
# We need scp for proprietary downloads.
|
||||||
# We need scp for proprietary downloads.
|
if(INSTALL_PROPRIETARY)
|
||||||
if(INSTALL_PROPRIETARY)
|
include(FindSCP)
|
||||||
include(FindSCP)
|
endif(INSTALL_PROPRIETARY)
|
||||||
endif(INSTALL_PROPRIETARY)
|
|
||||||
|
|
||||||
# The use_prebuilt_binary macro in cmake/Prebuilt.cmake records
|
# The use_prebuilt_binary macro in cmake/Prebuilt.cmake records
|
||||||
# packages in the PREBUILT property of the 'prepare' target.
|
# packages in the PREBUILT property of the 'prepare' target.
|
||||||
get_property(PREBUILT_PACKAGES TARGET prepare PROPERTY PREBUILT)
|
get_property(PREBUILT_PACKAGES TARGET prepare PROPERTY PREBUILT)
|
||||||
|
|
||||||
# Create a script to download the needed binaries.
|
# Create a script to download the needed binaries.
|
||||||
configure_file(${CMAKE_SOURCE_DIR}/cmake/DownloadPrebuilt.cmake.in
|
configure_file(${CMAKE_SOURCE_DIR}/cmake/DownloadPrebuilt.cmake.in
|
||||||
${CMAKE_BINARY_DIR}/DownloadPrebuilt.cmake @ONLY)
|
${CMAKE_BINARY_DIR}/DownloadPrebuilt.cmake @ONLY)
|
||||||
|
|
||||||
# Drive the download script at build time. Depend on 'install.xml'
|
# Drive the download script at build time. Depend on 'install.xml'
|
||||||
# to aqcuire new binaries when needed.
|
# to aqcuire new binaries when needed.
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
COMMENT "Obtaining prebuilt binaries..."
|
COMMENT "Obtaining prebuilt binaries..."
|
||||||
OUTPUT ${CMAKE_BINARY_DIR}/prepare/prebuilt
|
OUTPUT ${CMAKE_BINARY_DIR}/prepare/prebuilt
|
||||||
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_BINARY_DIR}/DownloadPrebuilt.cmake
|
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_BINARY_DIR}/DownloadPrebuilt.cmake
|
||||||
DEPENDS ${CMAKE_SOURCE_DIR}/../install.xml
|
DEPENDS ${CMAKE_SOURCE_DIR}/../install.xml
|
||||||
${CMAKE_BINARY_DIR}/DownloadPrebuilt.cmake
|
${CMAKE_BINARY_DIR}/DownloadPrebuilt.cmake
|
||||||
)
|
)
|
||||||
endif(NOT STANDALONE)
|
|
||||||
|
|||||||
46
indra/cmake/FindMyZLIB.cmake
Normal file
46
indra/cmake/FindMyZLIB.cmake
Normal file
@@ -0,0 +1,46 @@
|
|||||||
|
# -*- cmake -*-
|
||||||
|
|
||||||
|
# - Find zlib
|
||||||
|
# Find the ZLIB includes and library
|
||||||
|
# This module defines
|
||||||
|
# ZLIB_INCLUDE_DIRS, where to find zlib.h, etc.
|
||||||
|
# ZLIB_LIBRARIES, the libraries needed to use zlib.
|
||||||
|
# ZLIB_FOUND, If false, do not try to use zlib.
|
||||||
|
#
|
||||||
|
# This FindZLIB is about 43 times as fast the one provided with cmake (2.8.x),
|
||||||
|
# because it doesn't look up the version of zlib, resulting in a dramatic
|
||||||
|
# speed up for configure (from 4 minutes 22 seconds to 6 seconds).
|
||||||
|
#
|
||||||
|
# Note: Since this file is only used for standalone, the windows
|
||||||
|
# specific parts were left out.
|
||||||
|
|
||||||
|
FIND_PATH(ZLIB_INCLUDE_DIR zlib.h
|
||||||
|
NO_SYSTEM_ENVIRONMENT_PATH
|
||||||
|
)
|
||||||
|
|
||||||
|
FIND_LIBRARY(ZLIB_LIBRARY z)
|
||||||
|
|
||||||
|
if (ZLIB_LIBRARY AND ZLIB_INCLUDE_DIR)
|
||||||
|
SET(ZLIB_INCLUDE_DIRS ${ZLIB_INCLUDE_DIR})
|
||||||
|
SET(ZLIB_LIBRARIES ${ZLIB_LIBRARY})
|
||||||
|
SET(ZLIB_FOUND "YES")
|
||||||
|
else (ZLIB_LIBRARY AND ZLIB_INCLUDE_DIR)
|
||||||
|
SET(ZLIB_FOUND "NO")
|
||||||
|
endif (ZLIB_LIBRARY AND ZLIB_INCLUDE_DIR)
|
||||||
|
|
||||||
|
if (ZLIB_FOUND)
|
||||||
|
if (NOT ZLIB_FIND_QUIETLY)
|
||||||
|
message(STATUS "Found ZLIB: ${ZLIB_LIBRARIES}")
|
||||||
|
SET(ZLIB_FIND_QUIETLY TRUE)
|
||||||
|
endif (NOT ZLIB_FIND_QUIETLY)
|
||||||
|
else (ZLIB_FOUND)
|
||||||
|
if (ZLIB_FIND_REQUIRED)
|
||||||
|
message(FATAL_ERROR "Could not find ZLIB library")
|
||||||
|
endif (ZLIB_FIND_REQUIRED)
|
||||||
|
endif (ZLIB_FOUND)
|
||||||
|
|
||||||
|
mark_as_advanced(
|
||||||
|
ZLIB_LIBRARY
|
||||||
|
ZLIB_INCLUDE_DIR
|
||||||
|
)
|
||||||
|
|
||||||
@@ -1,44 +1,11 @@
|
|||||||
# -*- cmake -*-
|
# -*- cmake -*-
|
||||||
|
|
||||||
include(Python)
|
|
||||||
include(FindSCP)
|
|
||||||
|
|
||||||
macro (use_prebuilt_binary _binary)
|
macro (use_prebuilt_binary _binary)
|
||||||
if (NOT STANDALONE)
|
if(NOT STANDALONE)
|
||||||
if(${CMAKE_BINARY_DIR}/temp/sentinel_installed IS_NEWER_THAN ${CMAKE_BINARY_DIR}/temp/${_binary}_installed)
|
get_property(PREBUILT_PACKAGES TARGET prepare PROPERTY PREBUILT)
|
||||||
if(INSTALL_PROPRIETARY)
|
list(FIND PREBUILT_PACKAGES ${_binary} _index)
|
||||||
include(FindSCP)
|
if(_index LESS 0)
|
||||||
if(DEBUG_PREBUILT)
|
set_property(TARGET prepare APPEND PROPERTY PREBUILT ${_binary})
|
||||||
message("cd ${SCRIPTS_DIR} && ${PYTHON_EXECUTABLE} install.py --install-dir=${CMAKE_SOURCE_DIR}/.. --scp=${SCP_EXECUTABLE} ${_binary}")
|
endif(_index LESS 0)
|
||||||
endif(DEBUG_PREBUILT)
|
endif(NOT STANDALONE)
|
||||||
execute_process(COMMAND ${PYTHON_EXECUTABLE}
|
|
||||||
install.py
|
|
||||||
--install-dir=${CMAKE_SOURCE_DIR}/..
|
|
||||||
--scp=${SCP_EXECUTABLE}
|
|
||||||
${_binary}
|
|
||||||
WORKING_DIRECTORY ${SCRIPTS_DIR}
|
|
||||||
RESULT_VARIABLE ${_binary}_installed
|
|
||||||
)
|
|
||||||
else(INSTALL_PROPRIETARY)
|
|
||||||
if(DEBUG_PREBUILT)
|
|
||||||
message("cd ${SCRIPTS_DIR} && ${PYTHON_EXECUTABLE} install.py --install-dir=${CMAKE_SOURCE_DIR}/.. ${_binary}")
|
|
||||||
endif(DEBUG_PREBUILT)
|
|
||||||
execute_process(COMMAND ${PYTHON_EXECUTABLE}
|
|
||||||
install.py
|
|
||||||
--install-dir=${CMAKE_SOURCE_DIR}/..
|
|
||||||
${_binary}
|
|
||||||
WORKING_DIRECTORY ${SCRIPTS_DIR}
|
|
||||||
RESULT_VARIABLE ${_binary}_installed
|
|
||||||
)
|
|
||||||
endif(INSTALL_PROPRIETARY)
|
|
||||||
file(WRITE ${CMAKE_BINARY_DIR}/temp/${_binary}_installed "${${_binary}_installed}")
|
|
||||||
else(${CMAKE_BINARY_DIR}/temp/sentinel_installed IS_NEWER_THAN ${CMAKE_BINARY_DIR}/temp/${_binary}_installed)
|
|
||||||
set(${_binary}_installed 0)
|
|
||||||
endif(${CMAKE_BINARY_DIR}/temp/sentinel_installed IS_NEWER_THAN ${CMAKE_BINARY_DIR}/temp/${_binary}_installed)
|
|
||||||
if(NOT ${_binary}_installed EQUAL 0)
|
|
||||||
message(FATAL_ERROR
|
|
||||||
"Failed to download or unpack prebuilt '${_binary}'."
|
|
||||||
" Process returned ${${_binary}_installed}.")
|
|
||||||
endif (NOT ${_binary}_installed EQUAL 0)
|
|
||||||
endif (NOT STANDALONE)
|
|
||||||
endmacro (use_prebuilt_binary _binary)
|
endmacro (use_prebuilt_binary _binary)
|
||||||
|
|||||||
@@ -64,6 +64,8 @@ list(APPEND llplugin_SOURCE_FILES ${llplugin_HEADER_FILES})
|
|||||||
|
|
||||||
add_library (llplugin ${llplugin_SOURCE_FILES})
|
add_library (llplugin ${llplugin_SOURCE_FILES})
|
||||||
|
|
||||||
|
add_dependencies(llplugin prepare)
|
||||||
|
|
||||||
add_subdirectory(slplugin)
|
add_subdirectory(slplugin)
|
||||||
|
|
||||||
# # Add tests
|
# # Add tests
|
||||||
|
|||||||
@@ -47,3 +47,5 @@ add_library(media_plugin_base
|
|||||||
${media_plugin_base_SOURCE_FILES}
|
${media_plugin_base_SOURCE_FILES}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
add_dependencies(media_plugin_base prepare)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user