瀏覽代碼

Older CMake versions do not support -1 for string length

tags/1.0
Timo Röhling 12 年之前
父節點
當前提交
59f44111e9
共有 1 個檔案被更改,包括 1 行新增1 行删除
  1. 1
    1
      CMakeLists.txt

+ 1
- 1
CMakeLists.txt 查看文件

@@ -30,7 +30,7 @@ add_executable(${PROJECT_NAME} postsrsd.c sha1.c srs2.c)
30 30
 get_target_property(POSTSRSD ${PROJECT_NAME} LOCATION)
31 31
 get_filename_component(POSTSRSD ${POSTSRSD} NAME_WE)
32 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 34
 string(REPLACE "/" "." APPARMOR_PROFILE "${APPARMOR_PROFILE}")
35 35
 
36 36
 configure_file(${PROJECT_NAME}.init.in ${PROJECT_NAME}.init @ONLY)

Loading…
取消
儲存