Added CMakeLists.txt -- kept old Makefile
authorRick van Rein <rick@openfortress.nl>
Tue, 14 May 2019 05:45:12 +0000 (05:45 +0000)
committerRick van Rein <rick@openfortress.nl>
Tue, 14 May 2019 05:45:12 +0000 (05:45 +0000)
Also added explicit dependency and setup on libpcsclite-dev.
This is needed to be able to build pcscio.

CMakeLists.txt [new file with mode: 0644]
DEPENDENCIES [new file with mode: 0644]

diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644 (file)
index 0000000..6218f36
--- /dev/null
@@ -0,0 +1,28 @@
+cmake_minimum_required (VERSION 3.7)
+
+project ("hexio" C)
+
+include (FindPkgConfig)
+
+pkg_search_module (PCSCLITE REQUIRED libpcsclite libpcsclite-dev)
+
+# message ("Found pcsclite, ${PCSCLITE_FOUND}")
+message ("Found pcsclite includes at ${PCSCLITE_INCLUDE_DIRS}")
+# message ("Found pcsclite libraries at ${PCSCLITE_LIBRARIES}")
+# message ("Found pcsclite library dirs at ${PCSCLITE_LIBRARY_DIRS}")
+
+include_directories (${PCSCLITE_INCLUDE_DIRS})
+
+add_executable (hexin  hexin.c)
+add_executable (hexout hexout.c)
+add_executable (devio  devio.c)
+add_executable (pcscio pcscio.c)
+
+target_link_libraries (pcscio ${PCSCLITE_LIBRARIES})
+
+install (TARGETS hexin hexout devio pcscio
+       RUNTIME DESTINATION /usr/local/bin
+)
+install (PROGRAMS derdump
+       DESTINATION /usr/local/bin
+)
diff --git a/DEPENDENCIES b/DEPENDENCIES
new file mode 100644 (file)
index 0000000..23d804d
--- /dev/null
@@ -0,0 +1,2 @@
+pcscio.c
+       depends on libpcsclite-dev