using cmake

ali mousa <ali_mousa_zy-/[email protected]>
Newsgroups gmane.text.yaml.general
Message-ID <[email protected]>
Dear Friend :


I think that cmake is better than auto make or other tool , I know what I did is 
simple but I love to share it here , how to build using cmake .

In src directory do the following :-

1- create file CMakeLists.txt
    add this content  :-
    project (yaml_libary)
cmake_minimum_required (VERSION 2.6)
set(Yaml_VERSION_MAJOR 0)
set(Yaml_VERSION_MINOR 1)
set(Yaml_VERSION_PATCH 3)
set(Yaml_VERSION_STRING "0.1.3")
configure_file (
  "yaml_config.h.in"
  "../yaml_config.h"
  )
include_directories (../include)
add_library(yaml SHARED yaml_private.h api.c reader.c scanner.c parser.c 
loader.c writer.c emitter.c dumper.c)

2- create file  yaml_config.h.in
    add this content  :-
#define YAML_VERSION_MAJOR     @Yaml_VERSION_MAJOR@
#define YAML_VERSION_MINOR     @Yaml_VERSION_MINOR@
#define YAML_VERSION_PATCH     @Yaml_VERSION_PATCH@
#define YAML_VERSION_STRING     "@Yaml_VERSION_STRING@"

3- patch yaml_private.h with 
10a11,13
> /*include config file*/
> #include "yaml_config.h"
> 

4-create build directory .

5- cd build 
   cmake ../
   make 

6- this will create      libyaml.so and we are done 


Web developer 
Ali 

email:ali_mousa_zy-/[email protected] 

work-email:[email protected]

------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d

_______________________________________________
Yaml-core mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/yaml-core
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.