aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt6
1 files changed, 5 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index db8d2fb..30ca485 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -26,6 +26,7 @@ set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
+set(DEV OFF)
include(GNUInstallDirs)
@@ -82,7 +83,10 @@ ELSEIF(UNIX)
# add_library(hidapi-libusb STATIC hidapi/libusb/hid.c )
find_package(PkgConfig)
pkg_search_module(HIDAPI_LIBUSB REQUIRED hidapi-libusb)
- target_compile_options(nitrokey PRIVATE ${HIDAPI_LIBUSB_CFLAGS})
+ IF(DEV)
+ target_compile_options(nitrokey PRIVATE "${HIDAPI_LIBUSB_CFLAGS} -Os")
+ target_link_options(nitrokey PRIVATE "-Wl,-Map=output.map")
+ ENDIF()
target_link_libraries(nitrokey ${HIDAPI_LIBUSB_LDFLAGS})
ELSEIF(WIN32)
include_directories(hidapi/hidapi)