Fixed CMP0026 properly. Requires cmake 2.8.8+
This commit is contained in:
@@ -4,7 +4,7 @@
|
|||||||
# other commands to guarantee full compatibility
|
# other commands to guarantee full compatibility
|
||||||
# with the version specified
|
# with the version specified
|
||||||
|
|
||||||
cmake_minimum_required(VERSION 2.6.2 FATAL_ERROR)
|
cmake_minimum_required(VERSION 2.8.8 FATAL_ERROR)
|
||||||
|
|
||||||
# Eventually the third-party support modules (cmake/*.cmake) should
|
# Eventually the third-party support modules (cmake/*.cmake) should
|
||||||
# know the full path to all libraries. Until that happens we need
|
# know the full path to all libraries. Until that happens we need
|
||||||
@@ -15,10 +15,7 @@ cmake_minimum_required(VERSION 2.6.2 FATAL_ERROR)
|
|||||||
# CMP0003 to OLD and link to one library (apr) on a per-configuration
|
# CMP0003 to OLD and link to one library (apr) on a per-configuration
|
||||||
# basis to convince CMake to add the proper link directory. This line
|
# basis to convince CMake to add the proper link directory. This line
|
||||||
# can be removed when we use full paths for all libraries.
|
# can be removed when we use full paths for all libraries.
|
||||||
cmake_policy(SET CMP0003 OLD)
|
#cmake_policy(SET CMP0003 OLD)
|
||||||
if(NOT (CMAKE_MAJOR_VERSION LESS 3))
|
|
||||||
cmake_policy(SET CMP0026 OLD)
|
|
||||||
endif(NOT (CMAKE_MAJOR_VERSION LESS 3))
|
|
||||||
|
|
||||||
set(ROOT_PROJECT_NAME "Singularity" CACHE STRING
|
set(ROOT_PROJECT_NAME "Singularity" CACHE STRING
|
||||||
"The root project/makefile/solution name. Defaults to Singularity.")
|
"The root project/makefile/solution name. Defaults to Singularity.")
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
# Copies a binary back to the source directory
|
# Copies a binary back to the source directory
|
||||||
|
|
||||||
MACRO(COPY_BACK_TO_SOURCE target)
|
MACRO(COPY_BACK_TO_SOURCE target)
|
||||||
GET_TARGET_PROPERTY(FROM ${target} LOCATION)
|
SET(FROM $<TARGET_FILE:${target}>)
|
||||||
SET(TO ${CMAKE_CURRENT_SOURCE_DIR})
|
SET(TO ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
#MESSAGE("TARGET ${target} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${FROM} ${TO}")
|
#MESSAGE("TARGET ${target} POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${FROM} ${TO}")
|
||||||
ADD_CUSTOM_COMMAND(
|
ADD_CUSTOM_COMMAND(
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ MACRO(ADD_BUILD_TEST_INTERNAL name parent libraries source_files)
|
|||||||
${libraries}
|
${libraries}
|
||||||
)
|
)
|
||||||
|
|
||||||
GET_TARGET_PROPERTY(TEST_EXE ${name}_test LOCATION)
|
SET(TEST_EXE $<TARGET_FILE:${name}_test>)
|
||||||
SET(TEST_OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${name}_test_ok.txt)
|
SET(TEST_OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${name}_test_ok.txt)
|
||||||
|
|
||||||
IF ("${wrapper}" STREQUAL "")
|
IF ("${wrapper}" STREQUAL "")
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
# ll_deploy_sharedlibs_command
|
# ll_deploy_sharedlibs_command
|
||||||
# target_exe: the cmake target of the executable for which the shared libs will be deployed.
|
# target_exe: the cmake target of the executable for which the shared libs will be deployed.
|
||||||
macro(ll_deploy_sharedlibs_command target_exe)
|
macro(ll_deploy_sharedlibs_command target_exe)
|
||||||
get_target_property(TARGET_LOCATION ${target_exe} LOCATION)
|
SET(TARGET_LOCATION $<TARGET_FILE:${target_exe}>)
|
||||||
get_filename_component(OUTPUT_PATH ${TARGET_LOCATION} PATH)
|
get_filename_component(OUTPUT_PATH ${TARGET_LOCATION} PATH)
|
||||||
|
|
||||||
if(DARWIN)
|
if(DARWIN)
|
||||||
@@ -42,7 +42,8 @@ macro(ll_stage_sharedlib DSO_TARGET)
|
|||||||
# Also this directory is shared with RunBuildTest.cmake, y'know, for the tests.
|
# Also this directory is shared with RunBuildTest.cmake, y'know, for the tests.
|
||||||
set_target_properties(${DSO_TARGET} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${SHARED_LIB_STAGING_DIR})
|
set_target_properties(${DSO_TARGET} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${SHARED_LIB_STAGING_DIR})
|
||||||
if(NOT WINDOWS)
|
if(NOT WINDOWS)
|
||||||
get_target_property(DSO_PATH ${DSO_TARGET} LOCATION)
|
|
||||||
|
SET(DSO_PATH $<TARGET_FILE:${DSO_TARGET}>)
|
||||||
get_filename_component(DSO_FILE ${DSO_PATH} NAME)
|
get_filename_component(DSO_FILE ${DSO_PATH} NAME)
|
||||||
if(DARWIN)
|
if(DARWIN)
|
||||||
set(SHARED_LIB_STAGING_DIR_CONFIG ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/Resources)
|
set(SHARED_LIB_STAGING_DIR_CONFIG ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/Resources)
|
||||||
|
|||||||
@@ -1846,7 +1846,7 @@ if (WINDOWS)
|
|||||||
ENDFOREACH(RUNTIME_LIB ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS})
|
ENDFOREACH(RUNTIME_LIB ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS})
|
||||||
ENDIF(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS)
|
ENDIF(CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS)
|
||||||
|
|
||||||
get_target_property(BUILT_LLCOMMON llcommon LOCATION)
|
SET(BUILT_LLCOMMON $<TARGET_FILE:llcommon>)
|
||||||
|
|
||||||
set_target_properties(llcommon
|
set_target_properties(llcommon
|
||||||
PROPERTIES
|
PROPERTIES
|
||||||
@@ -1867,7 +1867,7 @@ if (WINDOWS)
|
|||||||
COMMENT "Copying llcommon.dll to the runtime folder."
|
COMMENT "Copying llcommon.dll to the runtime folder."
|
||||||
)
|
)
|
||||||
|
|
||||||
get_target_property(BUILT_SLPLUGIN SLPlugin LOCATION)
|
SET(BUILT_SLPLUGIN $<TARGET_FILE:SLPlugin>)
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
TARGET ${VIEWER_BINARY_NAME} POST_BUILD
|
TARGET ${VIEWER_BINARY_NAME} POST_BUILD
|
||||||
COMMAND ${CMAKE_COMMAND}
|
COMMAND ${CMAKE_COMMAND}
|
||||||
@@ -1879,7 +1879,7 @@ if (WINDOWS)
|
|||||||
COMMENT "Copying SLPlugin executable to the runtime folder."
|
COMMENT "Copying SLPlugin executable to the runtime folder."
|
||||||
)
|
)
|
||||||
|
|
||||||
get_target_property(BUILT_WEBKIT_PLUGIN media_plugin_webkit LOCATION)
|
SET(BUILT_WEBKIT_PLUGIN $<TARGET_FILE:media_plugin_webkit>)
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
TARGET ${VIEWER_BINARY_NAME} POST_BUILD
|
TARGET ${VIEWER_BINARY_NAME} POST_BUILD
|
||||||
COMMAND ${CMAKE_COMMAND}
|
COMMAND ${CMAKE_COMMAND}
|
||||||
@@ -1891,7 +1891,7 @@ if (WINDOWS)
|
|||||||
COMMENT "Copying WebKit Plugin to the runtime folder."
|
COMMENT "Copying WebKit Plugin to the runtime folder."
|
||||||
)
|
)
|
||||||
|
|
||||||
get_target_property(BUILT_QUICKTIME_PLUGIN media_plugin_quicktime LOCATION)
|
SET(BUILT_QUICKTIME_PLUGIN $<TARGET_FILE:media_plugin_quicktime>)
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
TARGET ${VIEWER_BINARY_NAME} POST_BUILD
|
TARGET ${VIEWER_BINARY_NAME} POST_BUILD
|
||||||
COMMAND ${CMAKE_COMMAND}
|
COMMAND ${CMAKE_COMMAND}
|
||||||
@@ -1903,7 +1903,7 @@ if (WINDOWS)
|
|||||||
COMMENT "Copying Quicktime Plugin to the runtime folder."
|
COMMENT "Copying Quicktime Plugin to the runtime folder."
|
||||||
)
|
)
|
||||||
|
|
||||||
get_target_property(BUILT_FILEPICKER_PLUGIN basic_plugin_filepicker LOCATION)
|
SET(BUILT_FILEPICKER_PLUGIN $<TARGET_FILE:basic_plugin_filepicker>)
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
TARGET ${VIEWER_BINARY_NAME} POST_BUILD
|
TARGET ${VIEWER_BINARY_NAME} POST_BUILD
|
||||||
COMMAND ${CMAKE_COMMAND}
|
COMMAND ${CMAKE_COMMAND}
|
||||||
@@ -1917,7 +1917,7 @@ if (WINDOWS)
|
|||||||
|
|
||||||
# winmm doesn't build on windows 64
|
# winmm doesn't build on windows 64
|
||||||
if(WORD_SIZE EQUAL 32)
|
if(WORD_SIZE EQUAL 32)
|
||||||
get_target_property(BUILT_WINMM_SHIM_PLUGIN winmm_shim LOCATION)
|
SET(BUILT_WINMM_SHIM_PLUGIN $<TARGET_FILE:winmm_shim>)
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
TARGET ${VIEWER_BINARY_NAME} POST_BUILD
|
TARGET ${VIEWER_BINARY_NAME} POST_BUILD
|
||||||
COMMAND ${CMAKE_COMMAND}
|
COMMAND ${CMAKE_COMMAND}
|
||||||
|
|||||||
@@ -129,7 +129,7 @@ if (WINDOWS)
|
|||||||
)
|
)
|
||||||
endif (WINDOWS)
|
endif (WINDOWS)
|
||||||
|
|
||||||
get_target_property(TEST_EXE test LOCATION)
|
SET(TEST_EXE $<TARGET_FILE:test>)
|
||||||
|
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/cpp_tests_ok.txt
|
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/cpp_tests_ok.txt
|
||||||
|
|||||||
@@ -330,33 +330,33 @@ else (DARWIN)
|
|||||||
)
|
)
|
||||||
endif (DARWIN)
|
endif (DARWIN)
|
||||||
|
|
||||||
get_target_property(BUILT_SLPLUGIN SLPlugin LOCATION)
|
SET(BUILT_SLPLUGIN $<TARGET_FILE:SLPlugin>)
|
||||||
add_custom_command(TARGET llmediaplugintest POST_BUILD
|
add_custom_command(TARGET llmediaplugintest POST_BUILD
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy ${BUILT_SLPLUGIN} ${PLUGINS_DESTINATION_DIR}
|
COMMAND ${CMAKE_COMMAND} -E copy ${BUILT_SLPLUGIN} ${PLUGINS_DESTINATION_DIR}
|
||||||
DEPENDS ${BUILT_SLPLUGIN}
|
DEPENDS ${BUILT_SLPLUGIN}
|
||||||
)
|
)
|
||||||
|
|
||||||
if (DARWIN OR WINDOWS)
|
if (DARWIN OR WINDOWS)
|
||||||
get_target_property(BUILT_WEBKIT_PLUGIN media_plugin_webkit LOCATION)
|
SET(BUILT_WEBKIT_PLUGIN $<TARGET_FILE:media_plugin_webkit>)
|
||||||
add_custom_command(TARGET llmediaplugintest POST_BUILD
|
add_custom_command(TARGET llmediaplugintest POST_BUILD
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy ${BUILT_WEBKIT_PLUGIN} ${PLUGINS_DESTINATION_DIR}
|
COMMAND ${CMAKE_COMMAND} -E copy ${BUILT_WEBKIT_PLUGIN} ${PLUGINS_DESTINATION_DIR}
|
||||||
DEPENDS ${BUILT_WEBKIT_PLUGIN}
|
DEPENDS ${BUILT_WEBKIT_PLUGIN}
|
||||||
)
|
)
|
||||||
|
|
||||||
get_target_property(BUILT_QUICKTIME_PLUGIN media_plugin_quicktime LOCATION)
|
SET(BUILT_QUICKTIME_PLUGIN $<TARGET_FILE:media_plugin_quicktime>)
|
||||||
add_custom_command(TARGET llmediaplugintest POST_BUILD
|
add_custom_command(TARGET llmediaplugintest POST_BUILD
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy ${BUILT_QUICKTIME_PLUGIN} ${PLUGINS_DESTINATION_DIR}
|
COMMAND ${CMAKE_COMMAND} -E copy ${BUILT_QUICKTIME_PLUGIN} ${PLUGINS_DESTINATION_DIR}
|
||||||
DEPENDS ${BUILT_QUICKTIME_PLUGIN}
|
DEPENDS ${BUILT_QUICKTIME_PLUGIN}
|
||||||
)
|
)
|
||||||
|
|
||||||
get_target_property(BUILT_EXAMPLE_PLUGIN media_plugin_example LOCATION)
|
SET(BUILT_EXAMPLE_PLUGIN $<TARGET_FILE:media_plugin_example>)
|
||||||
add_custom_command(TARGET llmediaplugintest POST_BUILD
|
add_custom_command(TARGET llmediaplugintest POST_BUILD
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy ${BUILT_EXAMPLE_PLUGIN} ${PLUGINS_DESTINATION_DIR}
|
COMMAND ${CMAKE_COMMAND} -E copy ${BUILT_EXAMPLE_PLUGIN} ${PLUGINS_DESTINATION_DIR}
|
||||||
DEPENDS ${BUILT_EXAMPLE_PLUGIN}
|
DEPENDS ${BUILT_EXAMPLE_PLUGIN}
|
||||||
)
|
)
|
||||||
|
|
||||||
# copy over bookmarks file if llmediaplugintest gets built
|
# copy over bookmarks file if llmediaplugintest gets built
|
||||||
get_target_property(BUILT_LLMEDIAPLUGINTEST llmediaplugintest LOCATION)
|
SET(BUILT_LLMEDIAPLUGINTEST $<TARGET_FILE:llmediaplugintest>)
|
||||||
add_custom_command(TARGET llmediaplugintest POST_BUILD
|
add_custom_command(TARGET llmediaplugintest POST_BUILD
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/bookmarks.txt ${CMAKE_CURRENT_BINARY_DIR}/
|
COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/bookmarks.txt ${CMAKE_CURRENT_BINARY_DIR}/
|
||||||
DEPENDS ${BUILT_LLMEDIAPLUGINTEST}
|
DEPENDS ${BUILT_LLMEDIAPLUGINTEST}
|
||||||
|
|||||||
Reference in New Issue
Block a user