naoqi_env.hpp
Go to the documentation of this file.
00001 /*
00002  * Copyright 2015 Aldebaran
00003  *
00004  * Licensed under the Apache License, Version 2.0 (the "License");
00005  * you may not use this file except in compliance with the License.
00006  * You may obtain a copy of the License at
00007  *
00008  *     http://www.apache.org/licenses/LICENSE-2.0
00009  *
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  *
00016 */
00017 
00018 
00019 #ifndef NAOQI_ENV_HPP
00020 #define NAOQI_ENV_HPP
00021 
00022 /*
00023 * ALDEBARAN includes
00024 */
00025 #include <qi/os.hpp>
00026 #include <boost/algorithm/string/split.hpp>
00027 #include <boost/algorithm/string/classification.hpp>
00028 
00029 namespace naoqi
00030 {
00031 namespace naoqi_env
00032 {
00033 
00034 static std::string getCMakePrefixPath()
00035 {
00036   char *cMakePrefixPath = getenv( "CMAKE_PREFIX_PATH" );
00037   if (cMakePrefixPath != NULL) {
00038     return getenv( "CMAKE_PREFIX_PATH" );
00039   }
00040   return "";
00041 }
00042 
00043 static void adjustSDKPrefix()
00044 {
00045   std::string cmake_prefix = getCMakePrefixPath();
00046   std::vector<std::string> prefixes;
00047   boost::split( prefixes, cmake_prefix, boost::is_any_of(":") );
00048 
00049   for (size_t i=0; i<prefixes.size(); i++)
00050   {
00051     std::cout << "going to add: " << prefixes[i] << std::endl;
00052     qi::path::detail::addOptionalSdkPrefix( prefixes[i].c_str() );
00053   }
00054 }
00055 
00056 } // naoqi_env
00057 } // naoqi
00058 #endif


naoqi_driver
Author(s): Karsten Knese
autogenerated on Tue Jul 9 2019 03:21:56