From 72281c23130749baea5fb18472b95445e2048225 Mon Sep 17 00:00:00 2001 From: Duncan Ogilvie Date: Sun, 4 Oct 2020 11:25:24 +0200 Subject: [PATCH] Properly link to pthread on lunix --- VTIL-Common/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/VTIL-Common/CMakeLists.txt b/VTIL-Common/CMakeLists.txt index b2ef581..eb54edb 100644 --- a/VTIL-Common/CMakeLists.txt +++ b/VTIL-Common/CMakeLists.txt @@ -13,7 +13,7 @@ source_group(TREE ${PROJECT_SOURCE_DIR} FILES ${SOURCES} ${INCLUDES}) target_include_directories(${PROJECT_NAME} PUBLIC includes) # Common needs Capstone & Keystone -target_link_libraries(${PROJECT_NAME} capstone-static keystone) +target_link_libraries(${PROJECT_NAME} PUBLIC capstone-static keystone) # Put all VTIL-specific compiler flags here # Linking (indirectly) to VTIL-Common will automatically propagate these flags @@ -48,3 +48,7 @@ if(MSVC) # -fpermissive MSVC equivalent target_compile_options(${PROJECT_NAME} PUBLIC /permissive-) endif() + +# Include Threads +find_package(Threads REQUIRED) +target_link_libraries(${PROJECT_NAME} PUBLIC ${CMAKE_THREAD_LIBS_INIT}) \ No newline at end of file