Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/gabime/spdlog.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgabime <gmelman1@gmail.com>2019-05-13 01:28:06 +0300
committergabime <gmelman1@gmail.com>2019-05-13 01:28:06 +0300
commitb3fe4b54c82ca11367789615eca7b2616e6abd58 (patch)
tree28d58cdc0a57b795e6f1aad15576a0656a087946 /CMakeLists.txt
parent872ea6bf09eb25f85e32479d4c5f2d8ffe93904a (diff)
Fixed CMakeLists.txt
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt14
1 files changed, 3 insertions, 11 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7ed17e67..1ed6a21b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -60,18 +60,12 @@ set(SRC_BASE "${CMAKE_CURRENT_SOURCE_DIR}/src")
set(STATIC_SRC_FILES "${SRC_BASE}/spdlog.cpp")
add_library(spdlog_static STATIC ${STATIC_SRC_FILES})
add_library(spdlog::static ALIAS spdlog_static)
-
-if (CMAKE_BUILD_TYPE EQUAL "RELEASE")
-set_target_properties(spdlog_static PROPERTIES OUTPUT_NAME "spdlog")
-else()
-set_target_properties(spdlog_static PROPERTIES OUTPUT_NAME "spdlog-debug")
-endif()
-
-
target_compile_definitions(spdlog_static PUBLIC SPDLOG_STATIC_LIB )
target_include_directories(spdlog_static PUBLIC "$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include>")
+set_target_properties(spdlog_static PROPERTIES OUTPUT_NAME "spdlog")
+set_target_properties(spdlog_static PROPERTIES DEBUG_POSTFIX "-debug")
-# headr only
+# Headr only
add_library(spdlog_header_only INTERFACE)
target_include_directories(spdlog_header_only INTERFACE "$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/include>")
add_library(spdlog::header_only ALIAS spdlog_header_only)
@@ -83,7 +77,6 @@ endif()
if(SPDLOG_FMT_EXTERNAL)
target_compile_definitions(spdlog_static INTERFACE SPDLOG_FMT_EXTERNAL)
target_link_libraries(spdlog_static INTERFACE fmt::fmt)
-
target_compile_definitions(spdlog_header_only INTERFACE SPDLOG_FMT_EXTERNAL)
target_link_libraries(spdlog_header_only INTERFACE fmt::fmt)
endif()
@@ -107,7 +100,6 @@ endif()
install(DIRECTORY ${HEADER_BASE} DESTINATION include)
install(TARGETS spdlog_static ARCHIVE DESTINATION lib)
-
#---------------------------------------------------------------------------------------
# register project in CMake user registry
#---------------------------------------------------------------------------------------