COMPILE_CONFIG option is now use to build python module with or without the dependency.

parent 94ccb43e
......@@ -19,6 +19,7 @@
// You should have received a copy of the GNU General Public License
// along with this program; if not, see <http://www.gnu.org/licenses/>.
//###########################################################################
%If (WITH_CONFIG)
class Setting;
%ExportedHeaderCode
......@@ -325,3 +326,4 @@ sipIsErr = 1; // should never happen
private:
CtConfig(const CtConfig &);
};
%End
\ No newline at end of file
......@@ -109,8 +109,9 @@ using namespace lima;
CtAccumulation* accumulation();
CtVideo* video();
CtEvent* event();
%If (WITH_CONFIG)
CtConfig* config();
%End
SoftOpExternalMgr* externalOperation();
HwInterface* hwInterface();
......
......@@ -197,8 +197,8 @@ ifneq ($(COMPILE_TIFF_SAVING),0)
INSTALL_CONFIG_DEFINES += -DWITH_TIFF_SAVING
endif
ifneq ($(COMPILE_CONFIG_CONTEXT),0)
INSTALL_CONFIG_DEFINES += -DWITH_CONFIG_CONTEXT
ifneq ($(COMPILE_CONFIG),0)
INSTALL_CONFIG_DEFINES += -DWITH_CONFIG
INSTALL_DEPS += libconfig.install
endif
##################
......
......@@ -96,7 +96,8 @@ def main():
except ValueError:
continue
if not value:
excludeMods.add(var.split('_')[-1].lower())
modname = '_'.join([x.lower() for x in var.split('_')[1:]])
excludeMods.add(modname)
for modName, modDirs in modules:
......@@ -228,8 +229,11 @@ def main():
plat = 'WIN32_PLATFORM'
else:
plat = 'POSIX_PLATFORM'
cmd = " ".join([config.sip_bin,"-g", "-e","-c", '.','-t',plat,
"-b", build_file,sipFileName])
cmdargs = [config.sip_bin,"-g", "-e","-c", '.','-t',plat]
if 'config' in excludeMods:
cmdargs.extend(['-x','WITH_CONFIG'])
cmdargs.extend(["-b", build_file,sipFileName])
cmd = " ".join(cmdargs)
print cmd
os.system(cmd)
......@@ -287,7 +291,9 @@ def main():
makefile.extra_lib_dirs += ['%s\lib\Win32' % os.environ['PYLON_ROOT']]
else:
makefile.extra_libs = ['pthread','lima%s' % modName]
makefile.extra_cxxflags = ['-pthread', '-g','-DWITH_SPS_IMAGE','-DWITH_CONFIG'] + extra_cxxflags
makefile.extra_cxxflags = ['-pthread', '-g','-DWITH_SPS_IMAGE'] + extra_cxxflags
if 'config' not in excludeMods:
makefile.extra_cxxflags.append('-DWITH_CONFIG')
makefile.extra_lib_dirs = [rootName('build')]
makefile.extra_cxxflags.extend(['-I"%s"' % x for x in extraIncludes])
......
......@@ -23,6 +23,8 @@
%Platforms {WIN32_PLATFORM WIN64_PLATFORM POSIX_PLATFORM}
%Feature WITH_CONFIG
%ModuleHeaderCode
#include <SoftOpId.h>
%End
......
......@@ -23,6 +23,8 @@
%Platforms {WIN32_PLATFORM WIN64_PLATFORM POSIX_PLATFORM}
%Feature WITH_CONFIG
%ModuleHeaderCode
#include <SoftOpId.h>
%End
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment