Merge pull request #105 from Shatur95/add_cmake_alias

Add library alias for CMake
This commit is contained in:
Itay Grudev 2020-05-25 07:01:21 +01:00 committed by GitHub
commit 91d5d96754
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 3 deletions

View File

@ -8,6 +8,7 @@ add_library(${PROJECT_NAME} STATIC
singleapplication.cpp
singleapplication_p.cpp
)
add_library(${PROJECT_NAME}::${PROJECT_NAME} ALIAS ${PROJECT_NAME})
# Find dependencies
find_package(Qt5 COMPONENTS Network REQUIRED)

View File

@ -9,5 +9,5 @@ add_executable(basic main.cpp)
find_package(Qt5 COMPONENTS Core REQUIRED)
add_subdirectory(../.. SingleApplication)
target_link_libraries(${PROJECT_NAME} SingleApplication)
target_link_libraries(${PROJECT_NAME} SingleApplication::SingleApplication)

View File

@ -17,4 +17,4 @@ add_executable(${PROJECT_NAME}
find_package(Qt5 COMPONENTS Widgets REQUIRED)
add_subdirectory(../.. SingleApplication)
target_link_libraries(${PROJECT_NAME} SingleApplication)
target_link_libraries(${PROJECT_NAME} SingleApplication::SingleApplication)

View File

@ -16,4 +16,4 @@ add_executable(${PROJECT_NAME}
find_package(Qt5 COMPONENTS Core REQUIRED)
add_subdirectory(../.. SingleApplication)
target_link_libraries(${PROJECT_NAME} SingleApplication)
target_link_libraries(${PROJECT_NAME} SingleApplication::SingleApplication)