Fix MSVC dll building

This commit is contained in:
2026-01-29 20:17:04 +01:00
parent 1ec06a26cc
commit 683c226ce0
7 changed files with 21 additions and 15 deletions

View File

@@ -70,6 +70,7 @@ if(${PD_BUILD_SHARED})
target_compile_definitions(palladium PRIVATE -DPD_BUILD_SHARED)
else()
add_library(palladium STATIC ${PD_SOURCES})
target_compile_definitions(palladium PUBLIC -DPD_BUILD_STATIC)
endif()
target_include_directories(palladium PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include)
@@ -82,12 +83,10 @@ if(${CMAKE_SYSTEM_NAME} STREQUAL "Nintendo3DS")
)
endif()
if(${CMAKE_BUILD_TYPE} STREQUAL "Release")
target_compile_options(palladium PRIVATE
$<$<CONFIG:Debug>:-O0 -g>
$<$<CONFIG:Release>:-O3>
)
endif()
target_compile_options(palladium PRIVATE
$<$<CONFIG:Debug>:-O0 -g>
$<$<CONFIG:Release>:-O3>
)
install(DIRECTORY include DESTINATION ".")
install(TARGETS palladium)
@@ -111,4 +110,4 @@ file(GLOB_RECURSE PD_FMTFILES CONFIGURE_DEPENDS
add_custom_target(pd-clang-format
COMMAND ${CLANG_FORMAT} --style=file -i ${PD_FMTFILES}
COMMENT "Formatting Project Sources"
)
)