From 7b62fc21692525cadd55ffd6a3a3c578e74bce8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=A4rkl?= Date: Sat, 1 Apr 2017 11:11:39 +0200 Subject: [PATCH] CMake on Windows: Detect 64 bit for library dir --- src/CMakeLists.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index b758d8e9..0e0369ee 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -18,7 +18,13 @@ if(WIN32) # use radare2 libraries from submodule on windows set(IAITO_WIN32_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../iaito_win32") list(APPEND CMAKE_PREFIX_PATH "${IAITO_WIN32_DIR}") - list(APPEND CMAKE_LIBRARY_PATH "${IAITO_WIN32_DIR}/radare2/lib32") + + if(CMAKE_SIZEOF_VOID_P EQUAL 8) # 64 bit + list(APPEND CMAKE_LIBRARY_PATH "${IAITO_WIN32_DIR}/radare2/lib64") + else() + list(APPEND CMAKE_LIBRARY_PATH "${IAITO_WIN32_DIR}/radare2/lib32") + endif() + set(RADARE2_INCLUDE_DIRS "${IAITO_WIN32_DIR}/radare2/include/libr" "${IAITO_WIN32_DIR}/include") endif()