From 516c9adf41eca4f9ed2ea3410239b21c58481854 Mon Sep 17 00:00:00 2001 From: xantares Date: Thu, 26 Feb 2015 11:00:25 +0000 Subject: [PATCH] set right export definitions for shared/static libs --- build/cmake/CMakeLists.txt | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/build/cmake/CMakeLists.txt b/build/cmake/CMakeLists.txt index ef84ad2..00156f5 100644 --- a/build/cmake/CMakeLists.txt +++ b/build/cmake/CMakeLists.txt @@ -37,18 +37,16 @@ endif () find_package (OpenGL REQUIRED) set (GLEW_LIBRARIES ${OPENGL_LIBRARIES}) -add_definitions (-DGLEW_BUILD -DGLEW_NO_GLU) +add_definitions (-DGLEW_NO_GLU) include_directories (${GLEW_DIR}/include) add_library (glew SHARED ${GLEW_DIR}/src/glew.c) +set_target_properties (glew PROPERTIES COMPILE_DEFINITIONS "GLEW_BUILD" OUTPUT_NAME "${GLEW_LIB_NAME}" PREFIX "${DLL_PREFIX}") add_library (glew_s STATIC ${GLEW_DIR}/src/glew.c) +set_target_properties (glew_s PROPERTIES COMPILE_DEFINITIONS "GLEW_STATIC" OUTPUT_NAME "${GLEW_LIB_NAME}" PREFIX lib) target_link_libraries (glew ${GLEW_LIBRARIES}) target_link_libraries (glew_s ${GLEW_LIBRARIES}) -set_target_properties (glew PROPERTIES OUTPUT_NAME ${GLEW_LIB_NAME}) -set_target_properties (glew_s PROPERTIES OUTPUT_NAME ${GLEW_LIB_NAME}) -set_target_properties (glew PROPERTIES PREFIX "${DLL_PREFIX}") -set_target_properties (glew_s PROPERTIES PREFIX lib) add_library(glewmx SHARED ${GLEW_DIR}/src/glew.c ) add_library(glewmx_s STATIC ${GLEW_DIR}/src/glew.c )