From f119cff5162e3c0e0d1e7996a67e7ae9d4af6d04 Mon Sep 17 00:00:00 2001 From: erwincoumans Date: Fri, 2 Feb 2018 19:38:39 -0800 Subject: [PATCH] fix #2 for pthread/dl --- Extras/BulletRobotics/CMakeLists.txt | 4 ++++ examples/RobotSimulator/CMakeLists.txt | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Extras/BulletRobotics/CMakeLists.txt b/Extras/BulletRobotics/CMakeLists.txt index 8abac18f5..192799fa8 100644 --- a/Extras/BulletRobotics/CMakeLists.txt +++ b/Extras/BulletRobotics/CMakeLists.txt @@ -120,6 +120,10 @@ ELSE(WIN32) IF(BUILD_CLSOCKET) ADD_DEFINITIONS(${OSDEF}) ENDIF(BUILD_CLSOCKET) + + IF(NOT APPLE) + TARGET_LINK_LIBRARIES( pthread ${DL} ) + ENDIF(APPLE) ENDIF(WIN32) IF(BUILD_ENET) diff --git a/examples/RobotSimulator/CMakeLists.txt b/examples/RobotSimulator/CMakeLists.txt index 2117dd332..dfebf4b2d 100644 --- a/examples/RobotSimulator/CMakeLists.txt +++ b/examples/RobotSimulator/CMakeLists.txt @@ -112,7 +112,7 @@ IF(WIN32) ELSE() IF(APPLE) ELSE(APPLE) - LINK_LIBRARIES( pthread ${DL} ) + TARGET_LINK_LIBRARIES( pthread ${DL} ) ENDIF(APPLE) ENDIF(WIN32)