Browse Source

upm: remove flag setting, move node to target only

* Fixes issue with swig and sysroots

Signed-off-by: Thomas Ingleby <thomas.c.ingleby@intel.com>
Thomas Ingleby 10 years ago
parent
commit
428f4e5bfc
1 changed files with 1 additions and 2 deletions
  1. 1
    2
      src/CMakeLists.txt

+ 1
- 2
src/CMakeLists.txt View File

@@ -17,7 +17,6 @@ endmacro (upm_CREATE_INSTALL_PKGCONFIG)
17 17
 
18 18
 macro(upm_SWIG_PYTHON)
19 19
   if (BUILDSWIGPYTHON AND BUILDSWIG)
20
-    set (CMAKE_C_FLAGS -DSWIGPYTHON=${SWIG_FOUND})
21 20
     set_source_files_properties (pyupm_${libname}.i PROPERTIES CPLUSPLUS ON)
22 21
     swig_add_module (pyupm_${libname} python pyupm_${libname}.i ${module_src})
23 22
     swig_link_libraries (pyupm_${libname} ${PYTHON_LIBRARIES} ${MRAA_LIBRARIES})
@@ -35,7 +34,6 @@ endmacro()
35 34
 
36 35
 macro(upm_SWIG_NODE)
37 36
   if (BUILDSWIGNODE AND BUILDSWIG)
38
-    set (CMAKE_CXX_FLAGS -DBUILDING_NODE_EXTENSION)
39 37
     set_source_files_properties (jsupm_${libname}.i PROPERTIES CPLUSPLUS ON)
40 38
     set_source_files_properties (jsupm_${libname}.i PROPERTIES SWIG_FLAGS "-node")
41 39
     swig_add_module (jsupm_${libname} javascript jsupm_${libname}.i ${module_src})
@@ -45,6 +43,7 @@ macro(upm_SWIG_NODE)
45 43
       "${NODE_INCLUDE_DIRS}"
46 44
      )
47 45
     set_target_properties (jsupm_${libname} PROPERTIES
46
+      COMPILE_FLAGS "${CMAKE_CXX_FLAGS} -DBUILDING_NODE_EXTENSION"
48 47
       PREFIX ""
49 48
       SUFFIX ".node"
50 49
     )