--- a/src/hugin1/ptbatcher/CMakeLists.txt
+++ b/src/hugin1/ptbatcher/CMakeLists.txt
@@ -1,15 +1,3 @@
-IF(NOT WIN32)
-set( PROGNAME PTBatcher )
-
-add_executable(PTBatcher PTBatcher.cpp PTBatcher.h PTBatcher_rc.rc Batch.cpp Batch.h RunStitchFrame.cpp RunStitchFrame.h ProjectArray.cpp ProjectArray.h)
-target_link_libraries(${PROGNAME} huginbasewx ${common_libs} ${image_libs} ${wxWidgets_LIBRARIES})
-install(TARGETS PTBatcher
-        DESTINATION ${BINDIR})
-ENDIF()
-
-#--------------------------------
-
-set(PROGNAME_GUI PTBatcherGUI )
 set(PTBATCHERGUI_SOURCE 
       PTBatcherGUI.cpp Batch.cpp RunStitchFrame.cpp ProjectArray.cpp ProjectListBox.cpp 
       BatchFrame.cpp FindPanoDialog.cpp FailedProjectsDialog.cpp BatchTrayIcon.cpp )
@@ -17,7 +5,7 @@
                          BatchFrame.h DirTraverser.h FindPanoDialog.h FailedProjectsDialog.h 
                          BatchTrayIcon.h PTBatcherGUI_rc.rc)
 IF (WIN32)
-  add_executable(${PROGNAME_GUI} WIN32 ${PTBATCHERGUI_SOURCE} ${PTBATCHERGUI_HEADER})
+  add_executable(PTBatcherGUI WIN32 ${PTBATCHERGUI_SOURCE} ${PTBATCHERGUI_HEADER})
 ELSEIF(APPLE)
   set( PROGNAME PTBatcherGUI )
   set( MACOSX_BUNDLE_EXTENSION pto)
@@ -41,22 +29,22 @@
   ENDIF(MAC_SELF_CONTAINED_BUNDLE)
      
   set( ICON_FILES ${MACOSX_BUNDLE_ICON_FILE} ${MACOSX_BUNDLE_TYPE_ICON_FILE} )
-  ADD_EXECUTABLE( ${PROGNAME_GUI} MACOSX_BUNDLE ${PTBATCHERGUI_SOURCE} ${PTBATCHERGUI_HEADER} ${ICON_FILES})
+  ADD_EXECUTABLE( PTBatcherGUI MACOSX_BUNDLE ${PTBATCHERGUI_SOURCE} ${PTBATCHERGUI_HEADER} ${ICON_FILES})
 
 ELSE (WIN32)
- add_executable(${PROGNAME_GUI} PTBatcherGUI.cpp ${PTBATCHERGUI_SOURCE} ${PTBATCHERGUI_HEADER})
+ add_executable(PTBatcherGUI PTBatcherGUI.cpp ${PTBATCHERGUI_SOURCE} ${PTBATCHERGUI_HEADER})
 ENDIF (WIN32)
 
 
-target_link_libraries(${PROGNAME_GUI} huginbasewx ${common_libs} ${image_libs} ${wxWidgets_LIBRARIES})
+target_link_libraries(PTBatcherGUI huginbasewx ${common_libs} ${image_libs} ${wxWidgets_LIBRARIES})
 
 IF (APPLE)
   IF (NOT MAC_SELF_CONTAINED_BUNDLE)
-    install(TARGETS ${PROGNAME_GUI}
+    install(TARGETS PTBatcherGUI
             DESTINATION ${INSTALL_OSX_BUNDLE_DIR})
   ENDIF (NOT MAC_SELF_CONTAINED_BUNDLE)
 ELSE(APPLE)
-  install(TARGETS ${PROGNAME_GUI}
+  install(TARGETS PTBatcherGUI
           DESTINATION ${BINDIR})
   IF (UNIX)
     INSTALL(FILES PTBatcherGUI.desktop DESTINATION ${DATADIR}/applications)