Skip to content

Commit

Permalink
use 'set_target_properties' instead of 'add_definitions'
Browse files Browse the repository at this point in the history
  • Loading branch information
sezero committed Feb 23, 2021
1 parent 21a1456 commit dfa12b8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ if(WIN32)
endif()

if(UNIX AND NOT APPLE)
add_definitions("-D_REENTRANT")
set_target_properties(SDL PROPERTIES COMPILE_DEFINITIONS "_REENTRANT")
target_link_libraries(SDL PRIVATE dl)
endif()
if(APPLE)
add_definitions("-D_THREAD_SAFE")
set_target_properties(SDL PROPERTIES COMPILE_DEFINITIONS "_THREAD_SAFE")
target_link_libraries(SDL PRIVATE "-framework AppKit")
endif()

Expand Down

0 comments on commit dfa12b8

Please sign in to comment.