mirror of
https://github.com/itay-grudev/SingleApplication.git
synced 2024-11-15 12:15:43 +08:00
Merge pull request #105 from Shatur95/add_cmake_alias
Add library alias for CMake
This commit is contained in:
commit
91d5d96754
@ -8,6 +8,7 @@ add_library(${PROJECT_NAME} STATIC
|
|||||||
singleapplication.cpp
|
singleapplication.cpp
|
||||||
singleapplication_p.cpp
|
singleapplication_p.cpp
|
||||||
)
|
)
|
||||||
|
add_library(${PROJECT_NAME}::${PROJECT_NAME} ALIAS ${PROJECT_NAME})
|
||||||
|
|
||||||
# Find dependencies
|
# Find dependencies
|
||||||
find_package(Qt5 COMPONENTS Network REQUIRED)
|
find_package(Qt5 COMPONENTS Network REQUIRED)
|
||||||
|
@ -9,5 +9,5 @@ add_executable(basic main.cpp)
|
|||||||
|
|
||||||
find_package(Qt5 COMPONENTS Core REQUIRED)
|
find_package(Qt5 COMPONENTS Core REQUIRED)
|
||||||
add_subdirectory(../.. SingleApplication)
|
add_subdirectory(../.. SingleApplication)
|
||||||
target_link_libraries(${PROJECT_NAME} SingleApplication)
|
target_link_libraries(${PROJECT_NAME} SingleApplication::SingleApplication)
|
||||||
|
|
||||||
|
@ -17,4 +17,4 @@ add_executable(${PROJECT_NAME}
|
|||||||
|
|
||||||
find_package(Qt5 COMPONENTS Widgets REQUIRED)
|
find_package(Qt5 COMPONENTS Widgets REQUIRED)
|
||||||
add_subdirectory(../.. SingleApplication)
|
add_subdirectory(../.. SingleApplication)
|
||||||
target_link_libraries(${PROJECT_NAME} SingleApplication)
|
target_link_libraries(${PROJECT_NAME} SingleApplication::SingleApplication)
|
||||||
|
@ -16,4 +16,4 @@ add_executable(${PROJECT_NAME}
|
|||||||
|
|
||||||
find_package(Qt5 COMPONENTS Core REQUIRED)
|
find_package(Qt5 COMPONENTS Core REQUIRED)
|
||||||
add_subdirectory(../.. SingleApplication)
|
add_subdirectory(../.. SingleApplication)
|
||||||
target_link_libraries(${PROJECT_NAME} SingleApplication)
|
target_link_libraries(${PROJECT_NAME} SingleApplication::SingleApplication)
|
||||||
|
Loading…
Reference in New Issue
Block a user