File: README.CMake

package info (click to toggle)
nqp 2014.07-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 23,596 kB
  • ctags: 7,993
  • sloc: ansic: 22,689; java: 20,240; cpp: 4,956; asm: 3,976; perl: 950; python: 267; sh: 245; makefile: 14
file content (82 lines) | stat: -rw-r--r-- 1,970 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
Notes on building DynCall with CMake
====================================


Build with CMake (in-source)
----------------------------

cd <dyncall-source-dir>

On Unix:
  cmake .
  make

On Windows:
  cmake . -G "NMake Makefiles"
  nmake /f Makefile

  NOTE: Assembly Support is broken for Visual Studio Generators in CMake
        So we support NMake for now only.

Install in a specific location
------------------------------
cmake -DCMAKE_INSTALL_PREFIX=<absolute-path>


Tested settings
---------------
- CMake Unix Makefile generators on Mac OS X and Linux.


Using from other CMake-based projects
-------------------------------------
Under buildsys/cmake/Modules you find some Find*() scripts
which you might find useful.


Make Universal Binary
---------------------
cmake -DCMAKE_OSX_ARCHITECTURES="i386;x86_64;ppc"


CMake Framework
---------------
The project name is "DynCall".
Each library in the source tree represents a target (not a sub-project!).
Support scripts for 'find_package' are at buildsys/cmake/Modules.

find_package( [DynLoad | DynCall | DynCallback] ) 

will set the variables:

	Dyn*_INCLUDE_DIRS
	Dyn*_LIBRARIES


Using dyncall libraries in other CMake projects
-----------------------------------------------
find_package(DynLoad REQUIRED)
add_includes(${DynLoad_INCLUDE_DIRS})
target_link_libraries( ... ${DynLoad_LIBRARIES})


Use as sub-project within CMake top-level project
-------------------------------------------------

add_subdirectory(path/to/dyncall/project/tree)
set(DynLoad_DIR ${DynCall_SOURCE_DIR}/dynload)
set(DynCall_DIR ${DynCall_SOURCE_DIR}/dyncall)
set(DynCallback_DIR ${DynCall_SOURCE_DIR}/dyncallback)

has the effect, that the 'find_package' works from within the project source 
tree.


Building for SPARC64 Architectures
----------------------------------

Supported Compilers: GCC, SunPro
Add -m64 to C, C++ and ASM flags, e.g.

$ cmake -DCMAKE_C_FLAGS=-m64 -DCMAKE_ASM_FLAGS=-m64 -DCMAKE_ASM_CXX_FLAGS=-m64