Skip to content
Snippets Groups Projects
Commit 8505a505 authored by Antoine Lorence's avatar Antoine Lorence
Browse files

Update CMakeLists.txt with the new software name

parent cd469b09
No related branches found
No related tags found
No related merge requests found
project(EIImage)
project(INSAimage)
cmake_minimum_required(VERSION 2.8.11)
# Find includes in corresponding build directories
......@@ -19,7 +19,7 @@ find_package(Qt5PrintSupport)
# We want to generate everything in the right target folder, for easier deployment
file(MAKE_DIRECTORY ${DEPLOY_OUTPUT_DIRECTORY}/lib)
set(DEPLOY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/eiimage CACHE PATH "The folder to use for deployment." FORCE)
set(DEPLOY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/insaimage CACHE PATH "The folder to use for deployment." FORCE)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${DEPLOY_OUTPUT_DIRECTORY}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${DEPLOY_OUTPUT_DIRECTORY}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${DEPLOY_OUTPUT_DIRECTORY})
......@@ -29,13 +29,13 @@ find_package(RandomLib 1.7 REQUIRED)
if(RandomLib_FOUND)
include_directories(${RandomLib_INCLUDE_DIRS})
else()
message(FATAL_ERROR "Unable to find Random library. Please clone, compile and install it before compiling eiimage.")
message(FATAL_ERROR "Unable to find Random library. Please clone, compile and install it before compiling insaimage.")
endif()
# Add CMake modules path
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules)
# Detiq-T is a submodule, it is built automatically before building eiimage
# Detiq-T is a submodule, it is built automatically before building insaimage
if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/lib/detiq-t AND IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/lib/detiq-t)
add_subdirectory(lib/detiq-t)
include_directories(lib/detiq-t/ImageIn lib/detiq-t/GenericInterface)
......@@ -107,7 +107,7 @@ if(WIN32)
endif()
add_custom_target(WinQtDeploy ALL
windeployqt ${DEPLOY_OUTPUT_DIRECTORY}/qwt.dll
COMMAND windeployqt ${DEPLOY_FLAGS} ${DEPLOY_OUTPUT_DIRECTORY}/eiimage.exe
COMMAND windeployqt ${DEPLOY_FLAGS} ${DEPLOY_OUTPUT_DIRECTORY}/insaimage.exe
COMMENT "Copy Qt & compiler DLL to the target directory")
add_dependencies(WinQtDeploy eiimage)
add_dependencies(WinQtDeploy insaimage)
endif()
set(eiimage_SOURCES
set(insaimage_SOURCES
main.cpp
Tools.h
Algorithms/ClassAnalysis.cpp
......@@ -183,15 +183,15 @@ set(TS_FILES eiimage_en.ts eiimage_fr.ts)
# -1- Use current translations files
qt5_add_translation(QM_FILES ${TS_FILES})
# -2- Update translations files with changes from c++ sources
# qt5_create_translation(QM_FILES ${eiimage_SOURCES} ${TS_FILES})
# qt5_create_translation(QM_FILES ${insaimage_SOURCES} ${TS_FILES})
# Avoid awful console on Windows
if(WIN32)
set(EXTRA_FLAGS WIN32)
endif()
add_executable(eiimage ${EXTRA_FLAGS} ${eiimage_SOURCES} ${WRAPPED_UIS} ${UIS} ${QM_FILES} ${TS_FILES} ${RCC_FILES})
target_link_libraries(eiimage
add_executable(insaimage ${EXTRA_FLAGS} ${insaimage_SOURCES} ${WRAPPED_UIS} ${UIS} ${QM_FILES} ${TS_FILES} ${RCC_FILES})
target_link_libraries(insaimage
core
Qt5::Core
Qt5::Widgets
......@@ -201,11 +201,11 @@ target_link_libraries(eiimage
${RandomLib_LIBRARIES}
)
add_custom_command(TARGET eiimage POST_BUILD
add_custom_command(TARGET insaimage POST_BUILD
COMMAND ${CMAKE_COMMAND} -E make_directory ${DEPLOY_OUTPUT_DIRECTORY}/lang
COMMENT "Create directory ${DEPLOY_OUTPUT_DIRECTORY}/lang")
foreach(__FILE ${QM_FILES})
add_custom_command(TARGET eiimage POST_BUILD
add_custom_command(TARGET insaimage POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy ${__FILE} ${DEPLOY_OUTPUT_DIRECTORY}/lang
COMMENT "Copy ${__FILE} to ${DEPLOY_OUTPUT_DIRECTORY}/lang")
endforeach()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment