@swisseph/node 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/binding.gyp CHANGED
@@ -4,19 +4,19 @@
4
4
  "target_name": "swisseph",
5
5
  "sources": [
6
6
  "binding/swisseph_binding.cc",
7
- "../../native/libswe/sweph.c",
8
- "../../native/libswe/swephlib.c",
9
- "../../native/libswe/swedate.c",
10
- "../../native/libswe/swejpl.c",
11
- "../../native/libswe/swemmoon.c",
12
- "../../native/libswe/swemplan.c",
13
- "../../native/libswe/swehouse.c",
14
- "../../native/libswe/swecl.c",
15
- "../../native/libswe/swehel.c"
7
+ "libswe/sweph.c",
8
+ "libswe/swephlib.c",
9
+ "libswe/swedate.c",
10
+ "libswe/swejpl.c",
11
+ "libswe/swemmoon.c",
12
+ "libswe/swemplan.c",
13
+ "libswe/swehouse.c",
14
+ "libswe/swecl.c",
15
+ "libswe/swehel.c"
16
16
  ],
17
17
  "include_dirs": [
18
18
  "<!@(node -p \"require('node-addon-api').include\")",
19
- "../../native/libswe",
19
+ "libswe",
20
20
  "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/c++/v1"
21
21
  ],
22
22
  "dependencies": [
@@ -0,0 +1,63 @@
1
+ # swisseph CMakeLists.txt
2
+
3
+ cmake_minimum_required( VERSION 3.10 )
4
+ project( cswisseph )
5
+
6
+ message( STATUS "-- Configuring cswisseph..." )
7
+
8
+ set( SOURCES
9
+ swecl.c
10
+ swedate.c
11
+ swehel.c
12
+ swehouse.c
13
+ swejpl.c
14
+ swemmoon.c
15
+ swemplan.c
16
+ #swemptab.c
17
+ sweph.c
18
+ swephlib.c
19
+ )
20
+
21
+ set( HEADERS
22
+ swedate.h
23
+ swedll.h
24
+ swehouse.h
25
+ swejpl.h
26
+ swemptab.h
27
+ swenut2000a.h
28
+ sweodef.h
29
+ sweph.h
30
+ swephexp.h
31
+ swephlib.h
32
+ )
33
+
34
+ include_directories( BEFORE . )
35
+
36
+ if ( MSVC )
37
+ add_definitions( -D_CRT_SECURE_NO_WARNINGS )
38
+ else()
39
+ add_definitions( -g -O9 -Wall )
40
+ if ( NOT MINGW )
41
+ add_definitions( -fPIC )
42
+ endif()
43
+ endif()
44
+
45
+ add_library( swe STATIC ${SOURCES} )
46
+
47
+ install( TARGETS swe ARCHIVE DESTINATION lib )
48
+ install( FILES ${HEADERS} DESTINATION include/swisseph )
49
+
50
+ # export some variables
51
+ set( LIBSWE_INCLUDE_PATH ${CMAKE_CURRENT_SOURCE_DIR}
52
+ CACHE STRING "Path to swisseph header files" )
53
+
54
+ # build some executable
55
+ if ( EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/mytest.c" )
56
+ add_executable( mytest mytest.c )
57
+ target_link_libraries( mytest swe )
58
+ if ( NOT MSVC )
59
+ target_link_libraries( mytest m dl )
60
+ endif()
61
+ endif()
62
+
63
+ # vi: ai et sw=4 ts=4 sts=4