lib/kde-build/build_system/cmake.rb in build-tool-0.0.1 vs lib/kde-build/build_system/cmake.rb in build-tool-0.0.2

- old
+ new

@@ -32,26 +32,33 @@ CMakeConfiguration end # Execute a cmake command in the context of the build directory def cmake( command, wd = build_directory ) - ENV['CMAKE_PREFIX_PATH'] = configuration.cmake_prefix_path + myenv = env + myenv['CMAKE_PREFIX_PATH'] = cmake_prefix_path self.class.execute "cmake #{command}", wd, env end + def cmake_prefix_path + @configuration.cmake_prefix_path + end + def make( command, wd = build_directory ) BuildTool::Make.new.make "#{command}", wd end def build( target ) check_build_directory( true ) make target end def reconfigure( clean ) - make "clean" if clean - self.class.execute "rm #{build_directory}/CMakeCache.txt" if clean + if clean + return false if make( "clean" ) != 0 + end + return false if self.class.execute( "rm #{build_directory}/CMakeCache.txt" ) != 0 configure end def configure check_build_directory( true ) @@ -61,9 +68,14 @@ rc end def configured? File.exist? "#{build_directory}/Makefile" + end + + def info + super + puts " CMAKE_PREFIX_PATH: #{cmake_prefix_path}" end def name "CMake" end