From 1fa2e67e227b64bc316c66eb79c389b032bf941f Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Sat, 29 Apr 2017 14:10:29 +0300 Subject: um: strip the 'lib' prefix from CMake targets --- um/service/CMakeLists.txt | 12 +++++------- um/service/test/CMakeLists.txt | 6 +++--- um/service/utils/CMakeLists.txt | 20 ++++++++++++-------- um/wrappers/simple/CMakeLists.txt | 12 +++++------- um/wrappers/simple/utils/CMakeLists.txt | 5 +++-- um/wrappers/special/nt_namespace/CMakeLists.txt | 13 +++++-------- .../special/nt_namespace/utils/CMakeLists.txt | 9 +++++---- 7 files changed, 38 insertions(+), 39 deletions(-) diff --git a/um/service/CMakeLists.txt b/um/service/CMakeLists.txt index 34b3d13..ff3f4f4 100644 --- a/um/service/CMakeLists.txt +++ b/um/service/CMakeLists.txt @@ -1,10 +1,8 @@ -file(GLOB libservice_sources "src/*.cpp") -file(GLOB_RECURSE libservice_headers "include/*.hpp") -add_library(libservice - ${libservice_sources} - ${libservice_headers}) -target_include_directories(libservice PUBLIC include) -target_compile_definitions(libservice PRIVATE NOMINMAX) +file(GLOB_RECURSE service_include "include/*.hpp") +file(GLOB service_src "src/*.cpp") +add_library(service ${service_src} ${service_include}) +target_compile_definitions(service PRIVATE NOMINMAX) +target_include_directories(service PUBLIC include/) add_subdirectory(test) add_subdirectory(utils) diff --git a/um/service/test/CMakeLists.txt b/um/service/test/CMakeLists.txt index 6825337..035d3a2 100644 --- a/um/service/test/CMakeLists.txt +++ b/um/service/test/CMakeLists.txt @@ -1,3 +1,3 @@ -add_executable(libservice_test_windows_error windows_error.cpp) -target_link_libraries(libservice_test_windows_error PRIVATE libservice) -set_target_properties(libservice_test_windows_error PROPERTIES OUTPUT_NAME windows_error) +add_executable(service_test_windows_error windows_error.cpp) +target_link_libraries(service_test_windows_error PRIVATE service) +set_target_properties(service_test_windows_error PROPERTIES OUTPUT_NAME windows_error) diff --git a/um/service/utils/CMakeLists.txt b/um/service/utils/CMakeLists.txt index fc5cc1b..f288c51 100644 --- a/um/service/utils/CMakeLists.txt +++ b/um/service/utils/CMakeLists.txt @@ -1,11 +1,15 @@ -add_executable(install_service install_service.cpp) -target_link_libraries(install_service PRIVATE libservice) +add_executable(service_install install_service.cpp) +target_link_libraries(service_install PRIVATE service) +set_target_properties(service_install PROPERTIES OUTPUT_NAME install_service) -add_executable(start_service start_service.cpp) -target_link_libraries(start_service PRIVATE libservice) +add_executable(service_start start_service.cpp) +target_link_libraries(service_start PRIVATE service) +set_target_properties(service_start PROPERTIES OUTPUT_NAME start_service) -add_executable(stop_service stop_service.cpp) -target_link_libraries(stop_service PRIVATE libservice) +add_executable(service_stop stop_service.cpp) +target_link_libraries(service_stop PRIVATE service) +set_target_properties(service_stop PROPERTIES OUTPUT_NAME stop_service) -add_executable(uninstall_service uninstall_service.cpp) -target_link_libraries(uninstall_service PRIVATE libservice) +add_executable(service_uninstall uninstall_service.cpp) +target_link_libraries(service_uninstall PRIVATE service) +set_target_properties(service_uninstall PROPERTIES OUTPUT_NAME uninstall_service) diff --git a/um/wrappers/simple/CMakeLists.txt b/um/wrappers/simple/CMakeLists.txt index ff61bd7..85bc34b 100644 --- a/um/wrappers/simple/CMakeLists.txt +++ b/um/wrappers/simple/CMakeLists.txt @@ -1,9 +1,7 @@ -file(GLOB_RECURSE libsimple_headers "include/*.hpp") -file(GLOB libsimple_sources "src/*.cpp") -add_library(libsimple - ${libsimple_sources} - ${libsimple_headers}) -target_link_libraries(libsimple libservice) -target_include_directories(libsimple PUBLIC include/) +file(GLOB_RECURSE simple_include "include/*.hpp") +file(GLOB simple_src "src/*.cpp") +add_library(simple ${simple_src} ${simple_include}) +target_include_directories(simple PUBLIC include/) +target_link_libraries(simple PRIVATE service) add_subdirectory(utils) diff --git a/um/wrappers/simple/utils/CMakeLists.txt b/um/wrappers/simple/utils/CMakeLists.txt index 2a653fe..c4d3bdd 100644 --- a/um/wrappers/simple/utils/CMakeLists.txt +++ b/um/wrappers/simple/utils/CMakeLists.txt @@ -1,2 +1,3 @@ -add_executable(exchange_ints exchange_ints.cpp) -target_link_libraries(exchange_ints PRIVATE libsimple) +add_executable(simple_exchange_ints exchange_ints.cpp) +target_link_libraries(simple_exchange_ints PRIVATE simple) +set_target_properties(simple_exchange_ints PROPERTIES OUTPUT_NAME exchange_ints) diff --git a/um/wrappers/special/nt_namespace/CMakeLists.txt b/um/wrappers/special/nt_namespace/CMakeLists.txt index ede2673..c9c6395 100644 --- a/um/wrappers/special/nt_namespace/CMakeLists.txt +++ b/um/wrappers/special/nt_namespace/CMakeLists.txt @@ -1,10 +1,7 @@ -project(libnt_namespace) -file(GLOB libnt_namespace_sources "src/*.cpp") -file(GLOB_RECURSE libnt_namespace_headers "include/*.hpp") -add_library(libnt_namespace - ${libnt_namespace_sources} - ${libnt_namespace_headers}) -target_link_libraries(libnt_namespace libservice) -target_include_directories(libnt_namespace PUBLIC include/) +file(GLOB_RECURSE nt_namespace_include "include/*.hpp") +file(GLOB nt_namespace_src "src/*.cpp") +add_library(nt_namespace ${nt_namespace_src} ${nt_namespace_include}) +target_include_directories(nt_namespace PUBLIC include/) +target_link_libraries(nt_namespace PRIVATE service) add_subdirectory(utils) diff --git a/um/wrappers/special/nt_namespace/utils/CMakeLists.txt b/um/wrappers/special/nt_namespace/utils/CMakeLists.txt index 294a713..9657693 100644 --- a/um/wrappers/special/nt_namespace/utils/CMakeLists.txt +++ b/um/wrappers/special/nt_namespace/utils/CMakeLists.txt @@ -1,6 +1,7 @@ -add_executable(convert_nt_path convert_nt_path.cpp) -target_link_libraries(convert_nt_path PRIVATE libnt_namespace) +add_executable(nt_namespace_convert convert_nt_path.cpp) +target_link_libraries(nt_namespace_convert PRIVATE nt_namespace) +set_target_properties(nt_namespace_convert PROPERTIES OUTPUT_NAME convert_nt_path) if(MINGW) - target_compile_options(convert_nt_path PRIVATE -municode) - target_link_libraries(convert_nt_path PRIVATE -municode) + target_compile_options(nt_namespace_convert PRIVATE -municode) + target_link_libraries(nt_namespace_convert PRIVATE -municode) endif() -- cgit v1.2.3