Skip to content

Commit

Permalink
Fixed linux build
Browse files Browse the repository at this point in the history
  • Loading branch information
HumanGamer committed Mar 9, 2024
1 parent b082ace commit ca18594
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tools/cmake/basics.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,17 @@ macro(addLib libs)
endforeach()
endmacro()

macro(addLinkLib libs)
foreach(lib ${libs})
# two possibilities: a) target already known, so add it directly, or b) target not yet known, so add it to its cache
if(TARGET ${PROJECT_NAME})
target_link_libraries(${PROJECT_NAME} "${lib}")
else()
list(APPEND ${PROJECT_NAME}_libs ${lib})
endif()
endforeach()
endmacro()

#addLibRelease will add to only release builds
macro(addLibRelease libs)
foreach(lib ${libs})
Expand Down
2 changes: 2 additions & 0 deletions tools/cmake/libraries/collada.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,6 @@ addInclude(${libDir}/collada/include/1.4)
addInclude(${libDir}/pcre)
addInclude(${libDir}/tinyxml)

addLinkLib(tinyxml)

finishLibrary()

0 comments on commit ca18594

Please sign in to comment.