summaryrefslogtreecommitdiff
path: root/ldmicro/CMakeLists.txt
diff options
context:
space:
mode:
authorakshay-c2019-07-31 11:18:02 +0530
committerakshay-c2019-07-31 11:18:02 +0530
commitfaa0815cf55a08cd974f01134821d4dcfd019e62 (patch)
treea4b94be08a039f67e42c0fa26d84e92d3afd65f6 /ldmicro/CMakeLists.txt
parent89e378f9c03698babcf1b6b3465fee24d411125d (diff)
downloadLDmicroQt-faa0815cf55a08cd974f01134821d4dcfd019e62.tar.gz
LDmicroQt-faa0815cf55a08cd974f01134821d4dcfd019e62.tar.bz2
LDmicroQt-faa0815cf55a08cd974f01134821d4dcfd019e62.zip
Standard debian installation
Diffstat (limited to 'ldmicro/CMakeLists.txt')
-rw-r--r--ldmicro/CMakeLists.txt32
1 files changed, 27 insertions, 5 deletions
diff --git a/ldmicro/CMakeLists.txt b/ldmicro/CMakeLists.txt
index 35ffc05..adb0c0f 100644
--- a/ldmicro/CMakeLists.txt
+++ b/ldmicro/CMakeLists.txt
@@ -103,6 +103,7 @@ IF(UNIX)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
+ set(CMAKE_AUTORCC ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
find_package(Qt5Widgets CONFIG REQUIRED)
find_package(Qt5Core CONFIG REQUIRED)
@@ -165,19 +166,40 @@ endif()
target_link_libraries (ldinterpret LinuxUI)
## Build main LDMicro executable
- add_executable (LDMicro ${COMPILE_CPP_SOURCES})
+ add_executable (LDMicro ${COMPILE_CPP_SOURCES} ldmicro.qrc)
add_dependencies(LDMicro LDMicro_SCRIPT_GENERATED_FILES)
- install (TARGETS LDMicro DESTINATION bin)
target_link_libraries (LDMicro LinuxUI)
target_link_libraries (LDMicro FreezeLD)
target_link_libraries(LDMicro ${Qt5Widgets_LIBRARIES})
target_link_libraries(LDMicro ${Qt5Core_LIBRARIES})
target_link_libraries(LDMicro ${Qt5Gui_LIBRARIES})
- INSTALL(TARGETS LDMicro DESTINATION /usr/local/bin/ldmicro)
- INSTALL(FILES ldmicro.ico DESTINATION /usr/local/bin/ldmicro)
- INSTALL(FILES LDMicro.desktop DESTINATION /usr/share/applications)
+ # Package Creation
+ if( NOT DEFAULT_INSTALL_PATH )
+ set( DEFAULT_INSTALL_PATH "${CMAKE_INSTALL_PREFIX}"
+ CACHE
+ PATH
+ "Location of LDMicro data files." )
+ endif()
+
+ # Set paths
+ set( UNIX_ICON_FILES icons/ )
+ set( UNIX_APPLICATIONS_FILES applications/ )
+ set( LDMICRO_BIN bin CACHE PATH "LDmicro binaries.")
+
+ install( DIRECTORY ${UNIX_ICON_FILES}
+ DESTINATION share/icons
+ COMPONENT resources
+ )
+
+ install( DIRECTORY ${UNIX_APPLICATIONS_FILES}
+ DESTINATION share/applications
+ COMPONENT resources
+ )
+ install( TARGETS LDMicro
+ DESTINATION bin
+ )
##Debian package creation
set(CPACK_GENERATOR "DEB")
set(CPACK_PACKAGE_VERSION_MAJOR ${LDMicro_VERSION_MAJOR})