Skip to content

Commit e8f6f91

Browse files
committed
Fix link Cocoa framework when building TORQUE_DYNAMIC_LIBRARY on macOS
1 parent 397066c commit e8f6f91

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

Engine/source/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,9 @@ if (TORQUE_DYNAMIC_LIBRARY AND NOT TORQUE_TESTING)
372372
add_library(TorqueEngine SHARED ${TORQUE_SOURCE_FILES})
373373
target_compile_definitions(TorqueEngine PUBLIC ${TORQUE_COMPILE_DEFINITIONS})
374374
target_link_libraries(TorqueEngine ${TORQUE_LINK_LIBRARIES})
375+
if (APPLE)
376+
target_link_libraries(TorqueEngine "-framework Cocoa")
377+
endif (APPLE)
375378
target_include_directories(TorqueEngine PUBLIC ${CMAKE_CURRENT_SOURCE_DIR} "${CMAKE_BINARY_DIR}/temp" ${TORQUE_INCLUDE_DIRECTORIES})
376379

377380
set(TORQUE_SOURCE_FILES "main/main.cpp")

0 commit comments

Comments
 (0)