Skip to content

Commit

Permalink
Add missing FindPCSCLite.cmake
Browse files Browse the repository at this point in the history
Fix Readme about location of FindPCSCLite.cmake
  • Loading branch information
CME committed Jun 24, 2013
1 parent fa9cddb commit 51b5e09
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Expand Up @@ -19,13 +19,13 @@ How to build

* Download FireBreath from http://www.firebreath.org/
* Let's say FBPlugins is the firebreath root
* Git clone pcsc project, you should have: FBPlugins/projects/PCSCBridge/PCSCBridge.cpp
* Git clone pcsc project, you should have: $(FBPlugins)/projects/PCSCBridge/PCSCBridge.cpp

Note that this README.md will overide the one of firebreath if you git-clone in place.

#### Under Linux:

Copy $(FBPlugins)/cmake/Modules/FindPCSCLite.cmake into /usr/share/cmake-2.8/Modules/ (or something like that)
Copy $(FBPlugins)/ext/FindPCSCLite.cmake into /usr/share/cmake-2.8/Modules/ (or something like that)
In $(FBPlugins)
prepmake.sh [-D CMAKE_BUILD_TYPE="Debug"]
Expand All @@ -47,8 +47,8 @@ Note that this README.md will overide the one of firebreath if you git-clone in
PROPERTIES LINK_FLAGS "/LIBPATH:\"C:\\WinDDK\\7600.16385.1\\lib\\ATL\\i386\" winscard.lib")
In $(FBPlugins)
./prep2008.cmd
open project $(FBPlugins)/build/projects/PCSCBridge/PCSCBridge.sln with VCexpress 2008
./prep2010.cmd
open project $(FBPlugins)/build/projects/PCSCBridge/PCSCBridge.sln with VCexpress 2010
build
dll is here
Expand Down
43 changes: 43 additions & 0 deletions ext/FindPCSCLite.cmake
@@ -0,0 +1,43 @@
# - Find PCSC-Lite
# Find the native PCSC-Lite includes and library
#
# PCSCLITE_INCLUDE_DIR - where to find winscard.h, wintypes.h, etc.
# PCSCLITE_LIBRARIES - List of libraries when using PCSC-Lite.
# PCSCLITE_FOUND - True if PCSC-Lite found.


IF (PCSCLITE_INCLUDE_DIR AND PCSCLITE_LIBRARIES)
# Already in cache, be silent
SET(PCSCLITE_FIND_QUIETLY TRUE)
ENDIF (PCSCLITE_INCLUDE_DIR AND PCSCLITE_LIBRARIES)

IF (NOT WIN32)
FIND_PACKAGE(PkgConfig)
PKG_CHECK_MODULES(PC_PCSCLITE libpcsclite)
ENDIF (NOT WIN32)

FIND_PATH(PCSCLITE_INCLUDE_DIR winscard.h
HINTS
${PC_PCSCLITE_INCLUDEDIR}
${PC_PCSCLITE_INCLUDE_DIRS}
${PC_PCSCLITE_INCLUDE_DIRS}/PCSC
)

FIND_LIBRARY(PCSCLITE_LIBRARY NAMES pcsclite libpcsclite PCSC
HINTS
${PC_PCSCLITE_LIBDIR}
${PC_PCSCLITE_LIBRARY_DIRS}
)

# handle the QUIETLY and REQUIRED arguments and set PCSCLITE_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(PCSC-Lite DEFAULT_MSG PCSCLITE_LIBRARY PCSCLITE_INCLUDE_DIR)

IF(PCSCLITE_FOUND)
SET( PCSCLITE_LIBRARIES ${PCSCLITE_LIBRARY} )
ELSE(PCSCLITE_FOUND)
SET( PCSCLITE_LIBRARIES )
ENDIF(PCSCLITE_FOUND)

MARK_AS_ADVANCED( PCSCLITE_LIBRARY PCSCLITE_INCLUDE_DIR )

0 comments on commit 51b5e09

Please sign in to comment.