Skip to content

Commit

Permalink
Add SDFORMAT_STATIC_DEFINE in cmake
Browse files Browse the repository at this point in the history
Signed-off-by: Juan Oxoby <[email protected]>
  • Loading branch information
Juan Oxoby committed Oct 25, 2020
1 parent 4ec13df commit 92a9813
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmake/SDFUtils.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@ macro (sdf_add_library _name)
set(LIBS_DESTINATION ${PROJECT_BINARY_DIR}/src)
add_library(${_name} ${ARGN})
set_target_properties(${_name} PROPERTIES DEFINE_SYMBOL "BUILDING_SDFORMAT_SHARED")
if(NOT BUILD_SHARED_LIBS)
target_compile_definitions(${_name} PUBLIC SDFORMAT_STATIC_DEFINE)
endif()
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${LIBS_DESTINATION})
if (MSVC)
set_target_properties( ${_name} PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${LIBS_DESTINATION})
Expand Down

0 comments on commit 92a9813

Please sign in to comment.