Link the UTILS to the static library if BUILD_SHARED_LIBS is disabled.

This commit is contained in:
Jose Santiago 2020-02-21 10:19:04 -06:00 committed by Nigel Stewart
parent 882aef9761
commit 5ea705737a

View File

@ -181,7 +181,11 @@ if (BUILD_UTILS)
list (APPEND GLEWINFO_SRC_FILES ${GLEW_DIR}/build/glewinfo.rc)
endif ()
add_executable (glewinfo ${GLEWINFO_SRC_FILES})
target_link_libraries (glewinfo glew)
if(NOT DEFINED BUILD_SHARED_LIBS OR BUILD_SHARED_LIBS)
target_link_libraries (glewinfo glew)
else()
target_link_libraries (glewinfo glew_s)
endif()
if (NOT WIN32)
target_link_libraries(glewinfo ${X11_LIBRARIES})
endif ()
@ -191,7 +195,11 @@ if (BUILD_UTILS)
list (APPEND VISUALINFO_SRC_FILES ${GLEW_DIR}/build/visualinfo.rc)
endif ()
add_executable (visualinfo ${VISUALINFO_SRC_FILES})
target_link_libraries (visualinfo glew)
if(NOT DEFINED BUILD_SHARED_LIBS OR BUILD_SHARED_LIBS)
target_link_libraries (visualinfo glew)
else()
target_link_libraries (visualinfo glew_s)
endif()
if (NOT WIN32)
target_link_libraries(visualinfo ${X11_LIBRARIES})
endif ()