Browse Source

Older CMake versions do not support -1 for string length

tags/1.0
Timo Röhling 12 years ago
parent
commit
59f44111e9
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      CMakeLists.txt

+ 1
- 1
CMakeLists.txt View File

30
 get_target_property(POSTSRSD ${PROJECT_NAME} LOCATION)
30
 get_target_property(POSTSRSD ${PROJECT_NAME} LOCATION)
31
 get_filename_component(POSTSRSD ${POSTSRSD} NAME_WE)
31
 get_filename_component(POSTSRSD ${POSTSRSD} NAME_WE)
32
 set(APPARMOR_PROFILE "${CMAKE_INSTALL_PREFIX}/sbin/${POSTSRSD}")
32
 set(APPARMOR_PROFILE "${CMAKE_INSTALL_PREFIX}/sbin/${POSTSRSD}")
33
-string(SUBSTRING "${APPARMOR_PROFILE}" 1 -1 APPARMOR_PROFILE)
33
+string(REGEX REPLACE "^/+" "" APPARMOR_PROFILE "${APPARMOR_PROFILE}")
34
 string(REPLACE "/" "." APPARMOR_PROFILE "${APPARMOR_PROFILE}")
34
 string(REPLACE "/" "." APPARMOR_PROFILE "${APPARMOR_PROFILE}")
35
 
35
 
36
 configure_file(${PROJECT_NAME}.init.in ${PROJECT_NAME}.init @ONLY)
36
 configure_file(${PROJECT_NAME}.init.in ${PROJECT_NAME}.init @ONLY)

Loading…
Cancel
Save