Skip to content
This repository has been archived by the owner on Jan 25, 2022. It is now read-only.

Commit

Permalink
use mexopencv.root instead of hardcoded paths
Browse files Browse the repository at this point in the history
  • Loading branch information
amroamroamro committed Mar 2, 2013
1 parent 116e3c9 commit 0584696
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion +cv/make.m
Expand Up @@ -10,7 +10,7 @@ function make(varargin)
%

cwd = pwd;
cd(fileparts(fileparts(mfilename('fullpath'))));
cd(mexopencv.root());

if ispc % Windows
% Clean
Expand Down
7 changes: 2 additions & 5 deletions test/UnitTest.m
Expand Up @@ -4,17 +4,14 @@
% cd test;
% UnitTest;
properties (Constant)
ROOT = fileparts(mfilename('fullpath'))
TESTDIR = [UnitTest.ROOT,filesep,'unit_tests']
BINDIR = [fileparts(UnitTest.ROOT),filesep,'matlab']
TESTDIR = fullfile(mexopencv.root(),'test','unit_tests');
end

methods
function obj = UnitTest()
%UNITTEST execute all unit tests
addpath(UnitTest.TESTDIR);
addpath(fileparts(UnitTest.ROOT));
d = dir([UnitTest.TESTDIR,filesep,'*.m']);
d = dir(fullfile(UnitTest.TESTDIR,'*.m'));
for i = 1:numel(d)
class_name = strrep(d(i).name,'.m','');
fprintf('== %s ======\n',class_name);
Expand Down
4 changes: 2 additions & 2 deletions utils/MDoc.m
Expand Up @@ -14,7 +14,7 @@

properties (Constant)
% Directory to place documentation
DIR = fullfile('doc','matlab')
DIR = fullfile(mexopencv.root(),'doc','matlab')
% Default CSS file
CSS = fullfile(matlabroot,'toolbox','matlab','helptools',...
'private','helpwin.css')
Expand Down Expand Up @@ -43,7 +43,7 @@
this.process_index();

% Get a list of functions
list = dir('+cv/*.m');
list = dir(fullfile(mexopencv.root(),'+cv','*.m'));
this.yet = strrep({list.name},'.m','');
while ~isempty(this.yet)
fname = this.yet{1};
Expand Down

0 comments on commit 0584696

Please sign in to comment.