Browse Source

Revert "Do not read LOCATION property any more"

This reverts commit 9f971b2e66.
master
Timo Röhling 8 years ago
parent
commit
ebc6ec13d0
1 changed files with 3 additions and 2 deletions
  1. 3
    2
      CMakeLists.txt

+ 3
- 2
CMakeLists.txt View File

81
     target_link_libraries(${PROJECT_NAME} ${LIBSOCKET} ${LIBNSL})
81
     target_link_libraries(${PROJECT_NAME} ${LIBSOCKET} ${LIBNSL})
82
 endif()
82
 endif()
83
 
83
 
84
-set(POSTSRSD "$<TARGET_FILE_NAME:${PROJECT_NAME}>")
85
-set(APPARMOR_PROFILE "${CMAKE_INSTALL_PREFIX}/sbin/${PROJECT_NAME}")
84
+get_target_property(POSTSRSD ${PROJECT_NAME} LOCATION)
85
+get_filename_component(POSTSRSD ${POSTSRSD} NAME_WE)
86
+set(APPARMOR_PROFILE "${CMAKE_INSTALL_PREFIX}/sbin/${POSTSRSD}")
86
 string(REGEX REPLACE "^/+" "" APPARMOR_PROFILE "${APPARMOR_PROFILE}")
87
 string(REGEX REPLACE "^/+" "" APPARMOR_PROFILE "${APPARMOR_PROFILE}")
87
 string(REPLACE "/" "." APPARMOR_PROFILE "${APPARMOR_PROFILE}")
88
 string(REPLACE "/" "." APPARMOR_PROFILE "${APPARMOR_PROFILE}")
88
 
89
 

Loading…
Cancel
Save