fltk/CMake/install-symlinks.cmake.in
Albrecht Schlosser 6390a0e09e [CMake] Improve installation, support DESTDIR, and more (STR #3149).
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10580 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
2015-02-16 14:30:27 +00:00

18 lines
676 B
CMake

# On unix create backward compatibility symlinks
if(NOT EXISTS $ENV{DESTDIR}@PREFIX_INCLUDE@/Fl)
EXECUTE_PROCESS(COMMAND ln -s FL Fl
WORKING_DIRECTORY $ENV{DESTDIR}@PREFIX_INCLUDE@
)
endif(NOT EXISTS $ENV{DESTDIR}@PREFIX_INCLUDE@/Fl)
file(GLOB FLTK_HEADER_FILES $ENV{DESTDIR}@PREFIX_INCLUDE@/FL/*.H)
foreach(file ${FLTK_HEADER_FILES})
GET_FILENAME_COMPONENT(nameWE ${file} NAME_WE)
if(NOT EXISTS $ENV{DESTDIR}@PREFIX_INCLUDE@/FL/${nameWE}.h)
EXECUTE_PROCESS(COMMAND ln -s ${nameWE}.H ${nameWE}.h
WORKING_DIRECTORY $ENV{DESTDIR}@PREFIX_INCLUDE@/FL
)
endif(NOT EXISTS $ENV{DESTDIR}@PREFIX_INCLUDE@/FL/${nameWE}.h)
endforeach(file)