diff options
| author | Martin Hořeňovský | 2020-05-03 18:54:38 +0200 |
|---|---|---|
| committer | Martin Hořeňovský | 2020-05-03 18:54:38 +0200 |
| commit | 19ecad6f68154df2ba182c93224bdda8d7527b34 (patch) | |
| tree | 6ed9ad0b61d00074efd7466ce85eed1cacf8c108 /src | |
| parent | 33c58dad419ccce92882e9edbe4fc6124bc193ee (diff) | |
| download | catch3-19ecad6f68154df2ba182c93224bdda8d7527b34.tar.gz | |
Rename CMake/pkg-config target Catch2Main to Catch2WithMain
This describes the reality better, as it also links in the rest
of Catch2.
The on-disk name of the static library remains just `Catch2Main`,
as that is what it is -- single main function -- and on-disk artifacts
cannot describe link dependencies.
Diffstat (limited to 'src')
| -rw-r--r-- | src/CMakeLists.txt | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 0a4a21f7..4b1c81d0 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -269,19 +269,22 @@ target_include_directories(Catch2 ) -add_library(Catch2Main STATIC +add_library(Catch2WithMain STATIC ${SOURCES_DIR}/internal/catch_main.cpp ) -add_library(Catch2::Catch2Main ALIAS Catch2Main) -target_link_libraries(Catch2Main PUBLIC Catch2) - +add_library(Catch2::Catch2WithMain ALIAS Catch2WithMain) +target_link_libraries(Catch2WithMain PUBLIC Catch2) +set_target_properties(Catch2WithMain + PROPERTIES + OUTPUT_NAME "Catch2Main" +) if (NOT_SUBPROJECT) # create and install an export set for catch target as Catch2::Catch install( TARGETS Catch2 - Catch2Main + Catch2WithMain EXPORT Catch2Targets DESTINATION @@ -342,5 +345,5 @@ if (CATCH_BUILD_EXAMPLES OR CATCH_BUILD_EXTRA_TESTS) ) endif() -list(APPEND CATCH_WARNING_TARGETS Catch2 Catch2Main) +list(APPEND CATCH_WARNING_TARGETS Catch2 Catch2WithMain) set(CATCH_WARNING_TARGETS ${CATCH_WARNING_TARGETS} PARENT_SCOPE) |