Skip to content

Commit

Permalink
add DLL_EXPORT for shared libs
Browse files Browse the repository at this point in the history
  • Loading branch information
ericLemanissier committed Jul 21, 2021
1 parent b1541f7 commit 45369ff
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions recipes/sdl2_image/2.0.5/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ endif()

set_target_properties(${PROJECT_NAME} PROPERTIES PUBLIC_HEADER source_subfolder/SDL_image.h)

if(${BUILD_SHARED_LIBS})
target_compile_definitions(${PROJECT_NAME} PRIVATE DLL_EXPORT)
endif()

install(TARGETS ${PROJECT_NAME}
ARCHIVE DESTINATION "lib"
LIBRARY DESTINATION "lib"
Expand Down
4 changes: 4 additions & 0 deletions recipes/sdl2_mixer/2.0.4/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@ endif()
target_link_libraries(${PROJECT_NAME} PRIVATE ${CONAN_LIBS})
set_target_properties(${PROJECT_NAME} PROPERTIES PUBLIC_HEADER source_subfolder/SDL_mixer.h)

if(${BUILD_SHARED_LIBS})
target_compile_definitions(${PROJECT_NAME} PRIVATE DLL_EXPORT)
endif()

install(TARGETS ${PROJECT_NAME}
ARCHIVE DESTINATION "lib"
LIBRARY DESTINATION "lib"
Expand Down

0 comments on commit 45369ff

Please sign in to comment.