Make all libraries STATIC for now
For shared library to work on Windows to work, we need to add declspec(export) and declspec(import) annotations to the symbols to export. This fixes the problem by making all libraries static on Windows, but we'll need to revisit and do proper symbol exports.
This commit is contained in:
parent
5fbdff6888
commit
26275d0a16
|
@ -36,7 +36,7 @@ set(INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src/include)
|
|||
|
||||
Generate(
|
||||
LIB_NAME nxt
|
||||
LIB_TYPE SHARED
|
||||
LIB_TYPE STATIC
|
||||
PRINT_NAME libNXT
|
||||
COMMAND_LINE_ARGS
|
||||
${GENERATOR_COMMON_ARGS}
|
||||
|
@ -46,7 +46,7 @@ target_include_directories(nxt PUBLIC ${GENERATED_DIR})
|
|||
|
||||
Generate(
|
||||
LIB_NAME nxtcpp
|
||||
LIB_TYPE SHARED
|
||||
LIB_TYPE STATIC
|
||||
PRINT_NAME libNXT++
|
||||
COMMAND_LINE_ARGS
|
||||
${GENERATOR_COMMON_ARGS}
|
||||
|
@ -58,7 +58,7 @@ SetCXX14(nxtcpp)
|
|||
|
||||
Generate(
|
||||
LIB_NAME mock_nxt
|
||||
LIB_TYPE SHARED
|
||||
LIB_TYPE STATIC
|
||||
PRINT_NAME libMockNXT
|
||||
COMMAND_LINE_ARGS
|
||||
${GENERATOR_COMMON_ARGS}
|
||||
|
|
|
@ -24,7 +24,7 @@ if (APPLE)
|
|||
)
|
||||
endif()
|
||||
|
||||
add_library(utils SHARED ${UTILS_SOURCES})
|
||||
add_library(utils STATIC ${UTILS_SOURCES})
|
||||
target_link_libraries(utils nxt_backend nxt_wire shaderc nxtcpp nxt)
|
||||
SetCXX14(utils)
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ execute_process(
|
|||
RESULT_VARIABLE RET
|
||||
)
|
||||
if (NOT RET EQUAL 0)
|
||||
message(FATAL_ERROR "Missing dependencies for VkCPP generation, please ensure you have python-jinja2 installed.")
|
||||
message(FATAL_ERROR "Missing dependencies for code generation, please ensure you have python-jinja2 installed.")
|
||||
endif()
|
||||
|
||||
function(Generate)
|
||||
|
|
|
@ -138,7 +138,7 @@ if (APPLE)
|
|||
)
|
||||
endif()
|
||||
|
||||
add_library(nxt_backend SHARED ${BACKEND_SOURCES})
|
||||
add_library(nxt_backend STATIC ${BACKEND_SOURCES})
|
||||
target_link_libraries(nxt_backend opengl_autogen null_autogen glfw glad spirv-cross)
|
||||
if (APPLE)
|
||||
target_link_libraries(nxt_backend metal_autogen)
|
||||
|
|
|
@ -30,7 +30,7 @@ target_link_libraries(wire_autogen nxt)
|
|||
SetCXX14(wire_autogen)
|
||||
SetPic(wire_autogen)
|
||||
|
||||
add_library(nxt_wire SHARED
|
||||
add_library(nxt_wire STATIC
|
||||
${WIRE_DIR}/TerribleCommandBuffer.h
|
||||
${WIRE_DIR}/WireCmd.cpp
|
||||
${WIRE_DIR}/WireCmd.h
|
||||
|
|
|
@ -29,7 +29,7 @@ find_package(Threads)
|
|||
target_link_libraries(gtest ${CMAKE_THREAD_LIBS_INIT})
|
||||
|
||||
# Glad
|
||||
add_library(glad SHARED
|
||||
add_library(glad STATIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/glad/src/glad.c
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/glad/include/glad/glad.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/glad/include/KHR/khrplatform.h
|
||||
|
@ -48,7 +48,7 @@ SetPIC(shaderc)
|
|||
SetPIC(shaderc_util)
|
||||
|
||||
# SPIRV-Cross
|
||||
add_library(spirv-cross SHARED
|
||||
add_library(spirv-cross STATIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/spirv-cross/GLSL.std.450.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/spirv-cross/spirv_common.hpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/spirv-cross/spirv_cfg.cpp
|
||||
|
|
Loading…
Reference in New Issue