cmake: fix memaslap configuration
authorMichael Wallner <mike@php.net>
Tue, 28 Feb 2023 07:48:54 +0000 (08:48 +0100)
committerMichael Wallner <mike@php.net>
Tue, 28 Feb 2023 07:48:54 +0000 (08:48 +0100)
contrib/bin/memaslap/CMakeLists.txt

index 581c01bd154132f57b10b20e0b4fb513053ead3f..c0a587ad13a52a555d716816c08b33d5b183abd8 100644 (file)
@@ -9,7 +9,7 @@ if(ENABLE_MEMASLAP AND CMAKE_USE_PTHREADS_INIT)
     check_dependency(LIBEVENT event)
 
     if(HAVE_LIBEVENT AND HAVE_ATOMICS)
-        add_executable(memaslap
+        add_executable(aslap
                 ms_main.c
                 ms_conn.c
                 ms_setting.c
@@ -17,19 +17,19 @@ if(ENABLE_MEMASLAP AND CMAKE_USE_PTHREADS_INIT)
                 ms_stats.c
                 ms_task.c
                 ms_thread.c)
-        target_include_directories(memaslap PRIVATE
+        target_include_directories(aslap PRIVATE
                 ${CMAKE_SOURCE_DIR}/include
                 ${CMAKE_BINARY_DIR}/include
                 ${CMAKE_SOURCE_DIR}/src
                 ${CMAKE_BINARY_DIR}/src
                 ${CMAKE_BINARY_DIR})
-        target_link_libraries(memaslap PRIVATE libmemcached Threads::Threads ${LIBEVENT} m)
-        set_property(TARGET memaslap PROPERTY C_STANDARD 11)
+        target_link_libraries(aslap PRIVATE libmemcached Threads::Threads ${LIBEVENT} m)
+        set_property(TARGET aslap PROPERTY C_STANDARD 11 OUTPUT_NAME ${CLIENT_PREFIX}aslap)
         if(CMAKE_INSTALL_RPATH)
-            set_target_properties(${CLIENT} PROPERTIES
+            set_target_properties(aslap PROPERTIES
                     INSTALL_RPATH ${CMAKE_INSTALL_RPATH}/../${CMAKE_INSTALL_LIBDIR})
         endif()
-        install(TARGETS memaslap
+        install(TARGETS aslap
                 RUNTIME COMPONENT bin DESTINATION ${CMAKE_INSTALL_BINDIR})
     endif()