mirror of
https://github.com/Perlmint/glew-cmake.git
synced 2024-11-11 01:23:48 +00:00
Merge pull request #37 from Perlmint/feature/install_symbolic_link
This commit is contained in:
commit
0be1dc6b89
@ -97,8 +97,16 @@ if(glew-cmake_BUILD_STATIC)
|
||||
OUTPUT_NAME "glew"
|
||||
DEBUG_POSTFIX d)
|
||||
|
||||
target_compile_definitions(libglew_static PUBLIC GLEW_STATIC)
|
||||
target_compile_definitions(libglew_static PUBLIC GLEW_STATIC)
|
||||
list(APPEND GLEW_TARGETS libglew_static)
|
||||
if(NOT WIN32)
|
||||
add_custom_command(TARGET libglew_static POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} ARGS -E create_symlink libglew.a libGLEW.a
|
||||
WORKING_DIRECTORY ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}
|
||||
BYPRODUCTS ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}/libGLEW.a
|
||||
COMMENT "create libGLEW symbolic link")
|
||||
install(FILES ${CMAKE_ARCHIVE_OUTPUT_DIRECTORY}/libGLEW.a TYPE LIB)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(glew-cmake_BUILD_SHARED)
|
||||
@ -112,6 +120,14 @@ if(glew-cmake_BUILD_SHARED)
|
||||
set_target_properties(libglew_shared PROPERTIES
|
||||
OUTPUT_NAME "glew"
|
||||
DEBUG_POSTFIX d)
|
||||
if(NOT WIN32)
|
||||
add_custom_command(TARGET libglew_shared POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} ARGS -E create_symlink libglew.so libGLEW.so
|
||||
WORKING_DIRECTORY ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
|
||||
BYPRODUCTS ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/libGLEW.so
|
||||
COMMENT "create libGLEW symbolic link")
|
||||
install(FILES ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/libGLEW.so TYPE LIB)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
target_compile_definitions(libglew_shared PRIVATE GLEW_BUILD)
|
||||
|
Loading…
Reference in New Issue
Block a user