From Bertrand (slight mods by me): fix CMake for Windows.
This commit is contained in:
parent
ab21611239
commit
7cc8e65c90
@ -223,6 +223,29 @@ macro(add_cling_subdirectory name)
|
||||
add_llvm_subdirectory(CLING TOOL ${name})
|
||||
endmacro()
|
||||
|
||||
file (STRINGS "VERSION" CLING_VERSION)
|
||||
string(REGEX REPLACE "([0-9]).[0-9]+~[a-zA-Z]+" "\\1" CLING_VERSION_MAJOR ${CLING_VERSION})
|
||||
string(REGEX REPLACE "[0-9].([0-9]+)~[a-zA-Z]+" "\\1" CLING_VERSION_MINOR ${CLING_VERSION})
|
||||
|
||||
if(DEFINED ROOT_BINARY_DIR)
|
||||
# Building as part of ROOT.
|
||||
set(CLING_VERSION ROOT_${CLING_VERSION})
|
||||
endif()
|
||||
message(STATUS "Cling version (from VERSION file): ${CLING_VERSION}")
|
||||
|
||||
set(CLING_VERSION_PATCHLEVEL 0)
|
||||
|
||||
macro(set_cling_windows_version_resource_properties name)
|
||||
if(DEFINED windows_resource_file)
|
||||
set_windows_version_resource_properties(${name} ${windows_resource_file}
|
||||
VERSION_MAJOR ${CLING_VERSION_MAJOR}
|
||||
VERSION_MINOR ${CLING_VERSION_MINOR}
|
||||
VERSION_PATCHLEVEL ${CLING_VERSION_PATCHLEVEL}
|
||||
VERSION_STRING "${CLING_VERSION} (${BACKEND_PACKAGE_STRING})"
|
||||
PRODUCT_NAME "cling")
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
macro(add_cling_library name)
|
||||
cmake_parse_arguments(ARG
|
||||
"SHARED"
|
||||
@ -303,17 +326,20 @@ endmacro(add_cling_executable)
|
||||
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
|
||||
# this is needed when building Cling as part of ROOT:
|
||||
include_directories(BEFORE
|
||||
${CMAKE_CURRENT_BINARY_DIR}/../llvm/src/tools/clang/include
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../llvm/src/tools/clang/include
|
||||
)
|
||||
|
||||
# and this when building Cling standalone:
|
||||
include_directories(BEFORE
|
||||
${CMAKE_CURRENT_BINARY_DIR}/../clang/include
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../clang/include
|
||||
)
|
||||
if(DEFINED ROOT_BINARY_DIR)
|
||||
# Building as part of ROOT.
|
||||
# this is needed when building Cling as part of ROOT:
|
||||
include_directories(BEFORE
|
||||
${CMAKE_CURRENT_BINARY_DIR}/../llvm/src/tools/clang/include
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../llvm/src/tools/clang/include
|
||||
)
|
||||
else()
|
||||
# and this when building Cling standalone:
|
||||
include_directories(BEFORE
|
||||
${CMAKE_CURRENT_BINARY_DIR}/../clang/include
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../clang/include
|
||||
)
|
||||
endif()
|
||||
|
||||
include_directories(BEFORE
|
||||
${CMAKE_CURRENT_BINARY_DIR}/include
|
||||
|
Loading…
x
Reference in New Issue
Block a user