Skip to content

Commit

Permalink
core/cmake: link with -m on brender, not math
Browse files Browse the repository at this point in the history
  • Loading branch information
vs49688 committed May 12, 2024
1 parent c5e733e commit 21f3705
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
9 changes: 9 additions & 0 deletions core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,15 @@ add_library(brender)
##
target_link_libraries(brender PRIVATE ${BRENDER_TARGETS})
target_link_libraries(brender INTERFACE brender-inc)

##
# Link with math here because it's a royal pain to do elsewhere.
##
find_library(math_library m)
if(UNIX AND math_library)
target_link_libraries(brender INTERFACE m)
endif()

set_target_properties(brender PROPERTIES
C_VISIBILITY_PRESET hidden
CXX_VISIBILITY_PRESET hidden
Expand Down
5 changes: 0 additions & 5 deletions core/math/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,3 @@ target_sources(math INTERFACE

target_compile_definitions(math PRIVATE __BR_V1DB__=0)
target_link_libraries(math PRIVATE brender-inc-ddi)

find_library(math_library m)
if (math_library)
target_link_libraries(math PUBLIC ${math_library})
endif ()

0 comments on commit 21f3705

Please sign in to comment.