diff --git a/CMakeLists.txt b/CMakeLists.txt index 5e93e13b..b06c2c37 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -44,7 +44,7 @@ set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib) # for unix, put debug files in a separate bin "debug" dir. # release bin files should stay in the root of the bin dir. -if (UNIX) +if (CMAKE_GENERATOR STREQUAL "Unix Makefiles") if (CMAKE_BUILD_TYPE STREQUAL Debug) set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin/debug) set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib/debug) diff --git a/src/lib/platform/COSXScreen.cpp b/src/lib/platform/COSXScreen.cpp index f766b165..c70f02eb 100644 --- a/src/lib/platform/COSXScreen.cpp +++ b/src/lib/platform/COSXScreen.cpp @@ -1546,7 +1546,7 @@ COSXScreen::handlePowerChangeRequest(natural_t messageType, void* messageArg) CEvent::Type COSXScreen::getConfirmSleepEvent() { - return CEvent::registerTypeOnce(s_confirmSleepEvent, + return EVENTQUEUE->registerTypeOnce(s_confirmSleepEvent, "COSXScreen::confirmSleep"); } diff --git a/tools/build/toolchain.py b/tools/build/toolchain.py index 0db362be..0dd7b7e3 100644 --- a/tools/build/toolchain.py +++ b/tools/build/toolchain.py @@ -162,8 +162,8 @@ class InternalCommands: print 'Defaulting target to: ' + self.defaultTarget target = self.defaultTarget - # for non-vs always specify a build type (debug, release, etc) - if not generator.cmakeName.startswith('Visual Studio'): + # for makefiles always specify a build type (debug, release, etc) + if generator.cmakeName.find('Unix Makefiles') != -1: cmake_args += ' -DCMAKE_BUILD_TYPE=' + target.capitalize() # if not visual studio, use parent dir @@ -290,17 +290,16 @@ class InternalCommands: for target in targets: self.ensureConfHasRun(target, skipConfig) - cmd = '' - if generator.find("Unix Makefiles") != -1: - print 'Building with GNU Make...' - cmd = self.make_cmd - elif generator == 'Xcode': - print 'Building with Xcode...' - cmd = self.xcodebuild_cmd - else: - raise Exception('Build command not supported with generator: ' + generator) - - for target in targets: + cmd = '' + if generator.find("Unix Makefiles") != -1: + print 'Building with GNU Make...' + cmd = self.make_cmd + elif generator == 'Xcode': + print 'Building with Xcode...' + cmd = self.xcodebuild_cmd + ' -configuration ' + target.capitalize() + else: + raise Exception('Build command not supported with generator: ' + generator) + self.try_chdir(self.getBuildDir(target)) err = os.system(cmd) self.restore_chdir()