CMake updates:
1. Initial compatibility with CMake 2.6 (verified on Mac OS X, other platforms may need more work) 2. Ability to more easily debug problems fetching prebuilt libraries (./develop.py configure -DDEBUG_PREBUILT=1) 3. Compatibility with Mac OS X MacPorts/Fink installations by trying to find and use system python executable firstmaster
parent
e79f766f57
commit
1bb86fb755
|
|
@ -1,10 +1,20 @@
|
|||
# -*- cmake -*-
|
||||
|
||||
project(SecondLife)
|
||||
# cmake_minimum_required should appear before any
|
||||
# other commands to guarantee full compatibility
|
||||
# with the version specified
|
||||
|
||||
# The FindPkgConfig module was released with 2.4.7.
|
||||
cmake_minimum_required(VERSION 2.4.7 FATAL_ERROR)
|
||||
|
||||
# This makes cmake 2.6 not complain about a version
|
||||
# 2.4 compatibility mode
|
||||
if(COMMAND cmake_policy)
|
||||
cmake_policy(SET CMP0003 OLD)
|
||||
endif(COMMAND cmake_policy)
|
||||
|
||||
project(SecondLife)
|
||||
|
||||
set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
|
||||
|
||||
include(Variables)
|
||||
|
|
|
|||
|
|
@ -8,6 +8,9 @@ macro (use_prebuilt_binary _binary)
|
|||
if(${CMAKE_BINARY_DIR}/temp/sentinel_installed IS_NEWER_THAN ${CMAKE_BINARY_DIR}/temp/${_binary}_installed)
|
||||
if(INSTALL_PROPRIETARY)
|
||||
include(FindSCP)
|
||||
if(DEBUG_PREBUILT)
|
||||
message("cd ${SCRIPTS_DIR} && ${PYTHON_EXECUTABLE} install.py --install-dir=${CMAKE_SOURCE_DIR}/.. --scp=${SCP_EXECUTABLE} ${_binary}")
|
||||
endif(DEBUG_PREBUILT)
|
||||
execute_process(COMMAND ${PYTHON_EXECUTABLE}
|
||||
install.py
|
||||
--install-dir=${CMAKE_SOURCE_DIR}/..
|
||||
|
|
@ -17,6 +20,9 @@ macro (use_prebuilt_binary _binary)
|
|||
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}/..
|
||||
|
|
|
|||
|
|
@ -18,6 +18,23 @@ elseif (EXISTS /etc/debian_version)
|
|||
|
||||
find_program(PYTHON_EXECUTABLE python2.5 python2.3 python PATHS /usr/bin)
|
||||
|
||||
if (PYTHON_EXECUTABLE)
|
||||
set(PYTHONINTERP_FOUND ON)
|
||||
endif (PYTHON_EXECUTABLE)
|
||||
elseif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
# On MAC OS X be sure to search standard locations first
|
||||
|
||||
string(REPLACE ":" ";" PATH_LIST "$ENV{PATH}")
|
||||
find_program(PYTHON_EXECUTABLE
|
||||
NAMES python python25 python24 python23
|
||||
NO_DEFAULT_PATH # Avoid searching non-standard locations first
|
||||
PATHS
|
||||
/bin
|
||||
/usr/bin
|
||||
/usr/local/bin
|
||||
${PATH_LIST}
|
||||
)
|
||||
|
||||
if (PYTHON_EXECUTABLE)
|
||||
set(PYTHONINTERP_FOUND ON)
|
||||
endif (PYTHON_EXECUTABLE)
|
||||
|
|
|
|||
Loading…
Reference in New Issue