Giter Club home page Giter Club logo

Comments (7)

GoogleCodeExporter avatar GoogleCodeExporter commented on June 23, 2024
Ok, so it got a bit out of hand. I've added Windows support to the CMake files 
now
and it seems to work quite smooth. Features:

- creates a shared (DLL) library for Windows
- compiles the tools using this shared library
- generates a LIB file which is used to compile against the DLL
- create a NSIS installer right from MSVC

Remarks:
- in order for it to work really smooth the nfc DLL should be added to
WINDOWS\SYSTEM32 (or at least a directory in PATH), but that would require admin
privileges afaik, so current version works as a normal user as well (by placing 
the
DLL together with the example apps)
- at compile time it depends "hard" on WinSCard.Lib provided by MSVC 2008 
Express (I
didn't want to use a separate winscard.lib file)
- it depends on libusb-win32 project, it needs to be installed and uses the 
shared
library from it
- the libnfc.h and bitutils.h needed to be modified (export the functions that 
should
be available in the DLL through the LIB file) 
- some of the example tools (that use getopt) don't compile anymore, but this 
is also
a problem in current SVN

Attached are updated versions of the CMakeLists files.

Original comment by fkooman%[email protected] on 1 Sep 2009 at 9:53

Attachments:

from libnfc.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 23, 2024
Hey Fkooman,

Thanks for your help !
I don't usually use CMake stuff, but you say that "it can be
considered a replacement for Autotools." So, I have some questions :
 1) What's benefit with CMake ?
 2) Does it allow cross-compiling ?
 3) Does it work under POSIX platforms or just under Linux ? 
 4) Do it make sense if we provide CMake and Autotools (CMake seems to more fit to
Windows users needs) ?

Original comment by [email protected] on 2 Sep 2009 at 3:52

  • Added labels: Type-Enhancement, Priority-Low
  • Removed labels: Type-Defect, Priority-Medium

from libnfc.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 23, 2024
> 1) What's benefit with CMake ?

No Autotools, no libtool, seems like a benefit to me :) Other than this: it is a
complete system with only 2 configuration files in the entire tree, cross 
platform.
See http://en.wikipedia.org/wiki/Cmake for a more comprehensive list.

Also CPack is nice, as mentioned above you can create a Windows installer right 
from
CMake/Visual Studio. And CMake-gui is interesting as well, you can easily set
configuration parameters there (like enable DEBUG or C99 compiler flags etc).

On Linux you would use "make package" or "make package_source" to create a 
binary /
source package.

> 2) Does it allow cross-compiling ?

Yes, see http://www.cmake.org/Wiki/CMake_Cross_Compiling, I didn't look into 
this yet
in detail. What do you want to cross compile for? 

> 3) Does it work under POSIX platforms or just under Linux ? 

* Linux and other POSIX systems (including AIX, *BSD systems, HP-UX, IRIX/SGI, 
and
Solaris)
* Mac OS X
* Windows 95/98/NT/2000/XP, Windows Vista and MinGW/MSYS

> 4) Do it make sense if we provide CMake and Autotools (CMake seems to more 
fit to
Windows users needs) ?

This makes perfect sense! Choice is good, and this seems like the way to go at 
first,
once all use cases are provided for by CMake it is still possible to throw 
Autotools
out, but not necessary at all. CMake only has 2 .txt files anyway.

I'll attach the latest version of the scripts again, and maybe you could try it 
out
at some point and let me know what you think (add the CMakeLists.txt to the 
project
root and the CMakeListsSRC.txt to the src directory as CMakeLists.txt as well)

$ apt-get install cmake cmake-gui
$ cd /path/to/libnfc-1.2.2/
$ mkdir bin
$ cd bin
$ cmake-gui ..   (or "cmake .." if you don't want to modify parameters)

  < play around with settings, press configure/generate to create Makefile >

$ make 
$ make install DESTDIR=foo  # to install everything under directory foo
$ make package              # to generate binary package
$ make package_source       # to generate source package


Original comment by fkooman%[email protected] on 2 Sep 2009 at 4:14

Attachments:

from libnfc.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 23, 2024
Thanks for reply and explanations.

1) I don't care Windows stuff and don't like GUI (which seems always less 
powerfull
than command line) but libnfc care about Windows users, so if it can be more 
handy
for them..

2) I cross-compile to run libnfc on routers using OpenWrt and smartphone 
(Openmoko
FreeRunner) using various distributions (SHR, Hackable:1, OpenWrt). That's why i
introduce Autotools in libnfc.

3) Fine.

4) Great ! Your two files have been commited in r82, but "target" and 
"initiator"
targets have been removed since they are not commited yet (lack of 
documentation).

Many thanks for help !

Original comment by [email protected] on 2 Sep 2009 at 5:02

  • Removed labels: Type-Enhancement

from libnfc.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 23, 2024

Original comment by [email protected] on 2 Sep 2009 at 5:03

  • Changed state: Fixed
  • Added labels: Type-Enhancement

from libnfc.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 23, 2024
I've updated the CMake files and fixed a pkg-config file bug at the same time. 
Patch
against current SVN.

Addressed:
- configure option to not compile PC/SC support (defaults to ON)
- fix pkg-config: @PACKAGE@ should not be in libdir line (at least, that is not 
where
autotools actually puts it...)
- sync variables in CMake file with current pkg-config file variables so it 
actually
works...

For Windows, more work is required... (the header files need to be updated). 
Expect
patch later.

Original comment by fkooman%[email protected] on 2 Sep 2009 at 9:45

Attachments:

from libnfc.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 23, 2024
Hi Fkooman,

The bug introduced by fixing "Issue 7" in pkg-config file has been fixed in r85.

CMake files have been updated in r86, but please make sure that files doesn't 
have
DOS line endings.

Thanks.

Original comment by [email protected] on 3 Sep 2009 at 9:23

from libnfc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.