Merge pull request #1054 from kiroma/master
Create an install and package targets in cmake tree #1054master
commit
9203edd741
8 changed files with 68 additions and 44 deletions
@ -0,0 +1,21 @@ |
|||||||
|
if(NOT EXISTS "@CMAKE_BINARY_DIR@/install_manifest.txt") |
||||||
|
message(FATAL_ERROR "Cannot find install manifest: @CMAKE_BINARY_DIR@/install_manifest.txt") |
||||||
|
endif() |
||||||
|
|
||||||
|
file(READ "@CMAKE_BINARY_DIR@/install_manifest.txt" files) |
||||||
|
string(REGEX REPLACE "\n" ";" files "${files}") |
||||||
|
foreach(file ${files}) |
||||||
|
message(STATUS "Uninstalling $ENV{DESTDIR}${file}") |
||||||
|
if(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}") |
||||||
|
exec_program( |
||||||
|
"@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\"" |
||||||
|
OUTPUT_VARIABLE rm_out |
||||||
|
RETURN_VALUE rm_retval |
||||||
|
) |
||||||
|
if(NOT "${rm_retval}" STREQUAL 0) |
||||||
|
message(FATAL_ERROR "Problem when removing $ENV{DESTDIR}${file}") |
||||||
|
endif() |
||||||
|
else(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}") |
||||||
|
message(STATUS "File $ENV{DESTDIR}${file} does not exist.") |
||||||
|
endif() |
||||||
|
endforeach() |
@ -1,11 +0,0 @@ |
|||||||
if(${PACKAGE_FIND_VERSION_MAJOR} EQUAL 0) |
|
||||||
if (${PACKAGE_FIND_VERSION} VERSION_LESS ${GLM_VERSION}) |
|
||||||
set(PACKAGE_VERSION_COMPATIBLE 1) |
|
||||||
endif() |
|
||||||
if(${PACKAGE_FIND_VERSION} VERSION_EQUAL ${GLM_VERSION}) |
|
||||||
set(PACKAGE_VERSION_EXACT 1) |
|
||||||
endif() |
|
||||||
else() |
|
||||||
set(PACKAGE_VERSION_UNSUITABLE 1) |
|
||||||
endif() |
|
||||||
|
|
@ -1,22 +0,0 @@ |
|||||||
cmake_minimum_required(VERSION 3.2 FATAL_ERROR) |
|
||||||
cmake_policy(VERSION 3.2) |
|
||||||
|
|
||||||
set(GLM_VERSION 0.9.9) |
|
||||||
|
|
||||||
get_filename_component(_IMPORT_PREFIX "${CMAKE_CURRENT_LIST_FILE}" PATH) |
|
||||||
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) |
|
||||||
get_filename_component(_IMPORT_PREFIX "${_IMPORT_PREFIX}" PATH) |
|
||||||
if (_IMPORT_PREFIX STREQUAL "/") |
|
||||||
set(_IMPORT_PREFIX "") |
|
||||||
endif() |
|
||||||
|
|
||||||
# Set the old GLM_INCLUDE_DIRS variable for backwards compatibility |
|
||||||
set(GLM_INCLUDE_DIRS ${_IMPORT_PREFIX}) |
|
||||||
|
|
||||||
add_library(glm::glm INTERFACE IMPORTED) |
|
||||||
set_target_properties(glm::glm PROPERTIES |
|
||||||
INTERFACE_INCLUDE_DIRECTORIES ${GLM_INCLUDE_DIRS}) |
|
||||||
|
|
||||||
mark_as_advanced(glm_DIR) |
|
||||||
set(_IMPORT_PREFIX) |
|
||||||
|
|
Loading…
Reference in New Issue