summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorAndrej Shadura <andrewsh@debian.org>2018-05-08 15:59:31 +0200
committerAndrej Shadura <andrewsh@debian.org>2018-05-08 15:59:31 +0200
commit47aa8b00b2b11df13a100489e0f904a4947177ef (patch)
treeb35c9acc778ea2f761f3c549f7bee2f4491b3144 /CMakeLists.txt
parent5b8466f7fae0e071c0f4eda13051c93313910028 (diff)
Import Upstream version 1.4.7
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt76
1 files changed, 25 insertions, 51 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c8e16d6..7db10e6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,88 +1,61 @@
-PROJECT(mcu8051ide)
+PROJECT(mcu8051ide "NONE")
+SET(mcu8051ide_version 1.4.7)
#
# INITIALIZE
#
-CMAKE_MINIMUM_REQUIRED(VERSION 2.4.2)
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
SET(CMAKE_BUILD_TYPE None)
SET(CMAKE_COLOR_MAKEFILE ON)
SET(CMAKE_VERBOSE_MAKEFILE ON)
SET(CMAKE_INCLUDE_CURRENT_DIR TRUE)
# target directory (for data files)
-SET(target_installation_directory /usr/share/mcu8051ide)
+SET(target_installation_directory share/mcu8051ide)
#
-# CONFIGURE
-#
-
-MESSAGE("Check for Tcl Interpreter")
-FIND_PACKAGE(TCL)
-IF(NOT TCL_FOUND)
- MESSAGE("!!! TCL interpreter not found !!!")
-ENDIF(NOT TCL_FOUND)
-
-FOREACH(library
- "BWidget 1.8"
- "Itcl 3.4"
- "Tcl 8.5"
- "md5 2.0"
- "Tk 8.5"
- "img::png 1.3"
- "tdom 0.8"
- "Tclx 8.4"
-)
- STRING(REGEX REPLACE "\t+.*$" "" library_name ${library})
- MESSAGE("Check for ${library_name}")
-
- EXECUTE_PROCESS(
- COMMAND "./test-lib.sh ${library}"
- RESULT_VARIABLE library_found
- )
-
- IF(NOT library_found)
- MESSAGE(FATAL_ERROR "Unable to find library: ${library}")
- ENDIF(NOT library_found)
-
-ENDFOREACH(library)
-
-
-#
-# BUILD
+# PREPARATION
#
# create launcher
FILE(WRITE mcu8051ide
"#!/bin/sh\n"
- "exec tclsh ${target_installation_directory}/lib/main.tcl \"$@\"\n"
+ "exec tclsh8.5 ${CMAKE_INSTALL_PREFIX}/${target_installation_directory}/lib/main.tcl \"$@\" || \\\n"
+ "\tprintf \"Unable to execute, TCL interpreter is not reachable.\n\" > /dev/stderr"
)
#
-# INSTALL
+# INSTALLATION
#
# Install icons
-FOREACH(subdir mcu other 16x16 22x22 32x32)
+FOREACH(subdir mcu flag other 16x16 22x22 32x32)
FILE(GLOB_RECURSE icons icons/${subdir}/*.png)
INSTALL(FILES ${icons} DESTINATION ${target_installation_directory}/icons/${subdir})
ENDFOREACH(subdir)
# Install source code files
-FOREACH(subdir . bottompanel compiler configdialogs dialogs editor leftpanel lib pale rightpanel simulator simulator/engine utilities)
+FOREACH(subdir . bottompanel compiler configdialogues dialogues editor leftpanel lib pale rightpanel simulator simulator/engine utilities)
FILE(GLOB lib lib/${subdir}/*.tcl)
INSTALL(FILES ${lib} DESTINATION ${target_installation_directory}/lib/${subdir})
ENDFOREACH(subdir)
+# Install contents of directory hwplugins
+FILE(GLOB file hwplugins/*)
+INSTALL(FILES ${file} DESTINATION ${target_installation_directory}/hwplugins)
+
# Install documentation files
FOREACH(subdir handbook)
- FILE(GLOB doc doc/${subdir}/*)
- INSTALL(FILES ${doc} DESTINATION ${target_installation_directory}/doc/${subdir})
+ FOREACH(ext pdf)
+ FILE(GLOB doc doc/${subdir}/*.${ext})
+ INSTALL(FILES ${doc} DESTINATION ${target_installation_directory}/doc/${subdir})
+ ENDFOREACH(ext)
ENDFOREACH(subdir)
# Install manual page(s)
FILE(GLOB man doc/man/*)
-INSTALL(FILES ${man} DESTINATION /usr/share/man/man1)
+INSTALL(FILES ${man} DESTINATION share/man/man1)
# Install demonstration project files
FILE(GLOB demo demo/*)
@@ -96,14 +69,15 @@ INSTALL(FILES ${data} DESTINATION ${target_installation_directory}/data)
FILE(GLOB translations translations/*)
INSTALL(FILES ${translations} DESTINATION ${target_installation_directory}/translations)
-# Incstall .desktop spec and application icon
-INSTALL(FILES mcu8051ide.png DESTINATION /usr/share/pixmaps/)
-INSTALL(FILES mcu8051ide.desktop DESTINATION /usr/share/applications/)
+# Install .desktop spec and application icon
+INSTALL(FILES mcu8051ide.png DESTINATION share/pixmaps/)
+INSTALL(FILES mcu8051ide.desktop DESTINATION share/applications/)
+INSTALL(FILES application-x-mcu8051ide.xml DESTINATION share/mime/packages/)
# Install launcher
INSTALL(
FILES mcu8051ide
- DESTINATION /usr/bin
+ DESTINATION bin
PERMISSIONS
WORLD_EXECUTE WORLD_READ
OWNER_WRITE OWNER_READ OWNER_EXECUTE
@@ -112,6 +86,6 @@ INSTALL(
# Install misc. files
INSTALL(
- FILES ChangeLog LICENSE TODO
+ FILES ChangeLog LICENSE
DESTINATION ${target_installation_directory}
)