From 9f3df6c128f49de806fb620c40d4e3313c18c908 Mon Sep 17 00:00:00 2001 From: Gyusun Yeom Date: Tue, 29 Dec 2020 20:18:49 +0900 Subject: [PATCH] Prevent output name collision --- CMakeLists.txt | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9061ec9..93a5694 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -80,9 +80,15 @@ endif() if(glew-cmake_BUILD_SHARED) add_library(libglew_shared SHARED ${LIBGLEW_SRCS}) - set_target_properties(libglew_shared PROPERTIES - OUTPUT_NAME "glew" - DEBUG_POSTFIX d) + if(glew-cmake_BUILD_STATIC) + set_target_properties(libglew_shared PROPERTIES + OUTPUT_NAME "glew-shared" + DEBUG_POSTFIX d) + else() + set_target_properties(libglew_shared PROPERTIES + OUTPUT_NAME "glew" + DEBUG_POSTFIX d) + endif() target_compile_definitions(libglew_shared PRIVATE GLEW_BUILD ${DEFINITIONS}) target_include_directories(libglew_shared PUBLIC ${INCLUDE_DIR})