diff options
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..8fadd73 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,43 @@ +project(acritoxinstaller) +cmake_minimum_required(VERSION 2.6) +find_package(Qt4 REQUIRED) + +include(${QT_USE_FILE}) +add_definitions(${QT_DEFINITIONS}) + +if(${CMAKE_BUILD_TYPE} MATCHES "Release") + add_definitions(-DNDEBUG) + add_definitions(-DQT_NO_DEBUG_OUTPUT) +endif(${CMAKE_BUILD_TYPE} MATCHES "Release") + +set(LIB_SUFFIX "" CACHE STRING "Define suffix of directory name (32/64)") +set(EXEC_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX} CACHE PATH "Installation prefix for executables and object code libraries" FORCE) +set(BIN_INSTALL_DIR ${EXEC_INSTALL_PREFIX}/bin CACHE PATH "Installation prefix for user executables" FORCE) +set(LIB_INSTALL_DIR ${EXEC_INSTALL_PREFIX}/lib${LIB_SUFFIX} CACHE PATH "Installation prefix for object code libraries" FORCE) +set(DATA_INSTALL_DIR ${EXEC_INSTALL_PREFIX}/share/acritoxinstaller CACHE PATH "Installation prefix where shared data will be installed" FORCE) +set(INCLUDE_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/include CACHE PATH "Installation prefix for C header files" FORCE) + +set(BACKEND_DIR ${DATA_INSTALL_DIR}) +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/backend/backend.sh.in ${CMAKE_CURRENT_BINARY_DIR}/backend.sh @ONLY) +install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/backend.sh DESTINATION "${BACKEND_DIR}") +install(DIRECTORY backend/modules DESTINATION "${DATA_INSTALL_DIR}") + +add_subdirectory( qtermwidget ) + +file(GLOB wizard_SRCS wizard/[a-z]*.cpp) +file(GLOB wizard_HDRS wizard/[a-z]*.h) +file(GLOB wizard_UIS wizard/[a-z]*.ui) + +configure_file(config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h) +set(acritoxinstaller_SRCS mainwizard.cpp main.cpp backend.cpp listitem.cpp listdelegate.cpp busyappfilter.cpp ${wizard_SRCS}) +set(acritoxinstaller_MOC_HDRS mainwizard.h backend.h listdelegate.h ${wizard_HDRS}) +set(acritoxinstaller_UIS ${wizard_UIS}) + +qt4_wrap_cpp(acritoxinstaller_MOC_SRCS ${acritoxinstaller_MOC_HDRS}) +qt4_wrap_ui(acritoxinstaller_UIS_H ${acritoxinstaller_UIS}) +include_directories(${CMAKE_CURRENT_BINARY_DIR}) +add_executable(acritoxinstaller ${acritoxinstaller_SRCS} ${acritoxinstaller_MOC_SRCS} ${acritoxinstaller_UIS_H}) +target_link_libraries(acritoxinstaller ${QT_LIBRARIES} qtermwidget crypt) + +install(TARGETS acritoxinstaller RUNTIME DESTINATION "${BIN_INSTALL_DIR}" LIBRARY DESTINATION "${LIB_INSTALL_DIR}") + |