naoqi_env.hpp
Go to the documentation of this file.
1 /*
2  * Copyright 2015 Aldebaran
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16 */
17 
18 
19 #ifndef NAOQI_ENV_HPP
20 #define NAOQI_ENV_HPP
21 
22 /*
23 * ALDEBARAN includes
24 */
25 #include <qi/os.hpp>
26 #include <boost/algorithm/string/split.hpp>
27 #include <boost/algorithm/string/classification.hpp>
28 
29 namespace naoqi
30 {
31 namespace naoqi_env
32 {
33 
34 static std::string getCMakePrefixPath()
35 {
36  char *cMakePrefixPath = getenv( "CMAKE_PREFIX_PATH" );
37  if (cMakePrefixPath != NULL) {
38  return getenv( "CMAKE_PREFIX_PATH" );
39  }
40  return "";
41 }
42 
43 static void adjustSDKPrefix()
44 {
45  std::string cmake_prefix = getCMakePrefixPath();
46  std::vector<std::string> prefixes;
47  boost::split( prefixes, cmake_prefix, boost::is_any_of(":") );
48 
49  for (size_t i=0; i<prefixes.size(); i++)
50  {
51  std::cout << "going to add: " << prefixes[i] << std::endl;
52  qi::path::detail::addOptionalSdkPrefix( prefixes[i].c_str() );
53  }
54 }
55 
56 } // naoqi_env
57 } // naoqi
58 #endif
static std::string getCMakePrefixPath()
Definition: naoqi_env.hpp:34
static void adjustSDKPrefix()
Definition: naoqi_env.hpp:43


naoqi_driver
Author(s): Karsten Knese
autogenerated on Sat Feb 15 2020 03:24:26