Merge pull request #1192 from davidgyu/dev_windows_build_fix

Fixed static library linking on Windows
This commit is contained in:
George ElKoura 2020-04-01 14:23:48 -07:00 committed by GitHub
commit f59eb46942
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 4 deletions

View File

@ -467,7 +467,7 @@ if(GLEW_FOUND AND GLEW_INCLUDE_DIR)
${GLEW_INCLUDE_DIR}
${PROJECT_SOURCE_DIR}/glLoader)
set(OPENGL_LOADER_LIBRARIES
glLoader
$<TARGET_OBJECTS:glLoader_obj>
${GLEW_LIBRARY}
${OPENGL_gl_LIBRARY})
@ -478,7 +478,7 @@ elseif(OPENGL_FOUND)
${OPENGL_INCLUDE_DIR}
${PROJECT_SOURCE_DIR}/glLoader)
set(OPENGL_LOADER_LIBRARIES
glLoader
$<TARGET_OBJECTS:glLoader_obj>
${OPENGL_gl_LIBRARY})
endif()

View File

@ -45,8 +45,8 @@ list(APPEND PLATFORM_LIBRARIES
"${OPENGL_LOADER_LIBRARIES}"
)
add_library(glLoader
STATIC
add_library(glLoader_obj
OBJECT
${GLLOADER_SOURCE_FILES}
${GLLOADER_HEADER_FILES}
)

View File

@ -64,6 +64,7 @@ if (NOT NO_LIB)
list(APPEND PLATFORM_GPU_LIBRARIES
${OPENGL_LOADER_LIBRARIES}
)
set(OPENGL_LOADER_OBJS $<TARGET_OBJECTS:glLoader_obj>)
elseif( OPENGLES_FOUND )
include_directories("${OPENGLES_INCLUDE_DIR}")
list(APPEND PLATFORM_GPU_LIBRARIES
@ -153,6 +154,7 @@ if (NOT NO_LIB)
STATIC
version.cpp
$<TARGET_OBJECTS:osd_gpu_obj>
${OPENGL_LOADER_OBJS}
${CUDA_KERNEL_FILES}
)
set_target_properties(osd_static_gpu PROPERTIES OUTPUT_NAME osdGPU CLEAN_DIRECT_OUTPUT 1)