From 0cc331730f9a1c39cecf377e3f3977939bca84d0 Mon Sep 17 00:00:00 2001 From: Mau Abata Date: Wed, 4 Oct 2023 23:57:49 -0500 Subject: [PATCH] IMplement #595 and also cleanup more CMAKE_CURRENT_SOURCE_DIR --- examples/CMakeLists.txt | 2 +- libnfc/CMakeLists.txt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 01a93c9b..e16d44b5 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt @@ -44,7 +44,7 @@ ENDFOREACH(source) #install required libraries IF(WIN32) INCLUDE(InstallRequiredSystemLibraries) - CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/cmake/FixBundle.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/FixBundle.cmake @ONLY) + CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/../cmake/FixBundle.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/FixBundle.cmake @ONLY) INSTALL(SCRIPT ${CMAKE_CURRENT_BINARY_DIR}/FixBundle.cmake) ENDIF(WIN32) diff --git a/libnfc/CMakeLists.txt b/libnfc/CMakeLists.txt index 2b4c39c4..f806193e 100644 --- a/libnfc/CMakeLists.txt +++ b/libnfc/CMakeLists.txt @@ -74,7 +74,7 @@ IF(LIBNFC_LOG) LIST(APPEND LIBRARY_SOURCES log log-internal) ENDIF(WIN32) ENDIF(LIBNFC_LOG) -ADD_LIBRARY(nfc SHARED ${LIBRARY_SOURCES}) +ADD_LIBRARY(nfc ${LIBRARY_SOURCES}) IF(PCSC_FOUND) TARGET_LINK_LIBRARIES(nfc ${PCSC_LIBRARIES}) @@ -111,6 +111,6 @@ IF(WIN32) # At compile time we need the .LIB file, we place it in the lib directory INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/libnfc.lib DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries) ELSE(WIN32) - INSTALL(TARGETS nfc LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries) + INSTALL(TARGETS nfc ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} COMPONENT libraries) ENDIF(WIN32)