mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-25 19:07:45 +00:00
cmake: make the merged build much more usable by adding all the source files to the IDE
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@37169 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
aec9cfe725
commit
715b9e92bd
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2006, Peter Kümmel, <syntheticpp@gmx.net>
|
||||
# Copyright (c) 2006-2011 Peter Kümmel, <syntheticpp@gmx.net>
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
@ -171,7 +171,13 @@ macro(lyx_const_touched_files _allinone_name _list)
|
||||
file(APPEND ${_file_touched} "#include \"${_file_const}\"\n\n\n")
|
||||
endif()
|
||||
|
||||
set(${_file_list} ${_file_const} ${_file_touched})
|
||||
#add merged files also to the project so they become editable
|
||||
if(${GROUP_CODE} MATCHES "flat")
|
||||
lyx_add_info_files_no_group(${${_list}})
|
||||
else()
|
||||
lyx_add_info_files(MergedFiles ${${_list}})
|
||||
endif()
|
||||
set(${_file_list} ${_file_const} ${_file_touched} ${lyx_${groupname}_info_files})
|
||||
|
||||
foreach (_current_FILE ${${_list}})
|
||||
get_filename_component(_abs_FILE ${_current_FILE} ABSOLUTE)
|
||||
@ -252,3 +258,27 @@ macro(LYX_OPTION _name _description _default _sys)
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
macro(lyx_add_info_files group)
|
||||
foreach(_it ${ARGN})
|
||||
if(NOT IS_DIRECTORY ${_it})
|
||||
get_filename_component(name ${_it} NAME)
|
||||
if(NOT ${_it} MATCHES "^/\\\\..*$;~$")
|
||||
set_source_files_properties(${_it} PROPERTIES HEADER_FILE_ONLY TRUE)
|
||||
set(lyx_${group}_info_files ${lyx_${group}_info_files} ${_it})
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
if(group)
|
||||
source_group(${group} FILES ${lyx_${group}_info_files})
|
||||
endif()
|
||||
set(lyx_info_files ${lyx_info_files} ${lyx_${group}_info_files})
|
||||
endmacro()
|
||||
|
||||
macro(lyx_add_info_files_no_group)
|
||||
lyx_add_info_files( "" ${ARGN})
|
||||
endmacro()
|
||||
|
||||
macro(lyx_find_info_files group files)
|
||||
file(GLOB _filelist ${files})
|
||||
lyx_add_info_files(${group} ${_filelist})
|
||||
endmacro()
|
||||
|
@ -1,7 +1,7 @@
|
||||
# This file is part of LyX, the document processor.
|
||||
# Licence details can be found in the file COPYING.
|
||||
#
|
||||
# Copyright (c) 2006, Peter Kümmel, <syntheticpp@gmx.net>
|
||||
# Copyright (c) 2006-2011 Peter Kümmel, <syntheticpp@gmx.net>
|
||||
#
|
||||
|
||||
set(_lyx ${PACKAGE_BASE}${PROGRAM_SUFFIX})
|
||||
@ -95,31 +95,9 @@ if(WIN32)
|
||||
message(STATUS "Using icon defined in resource file: ${FILE_RC}")
|
||||
endif()
|
||||
|
||||
if(MSVC_IDE)
|
||||
file(GLOB info_files ${TOP_SRC_DIR}/*)
|
||||
set(lyx_info_files)
|
||||
foreach(_it ${info_files})
|
||||
if(NOT IS_DIRECTORY ${_it})
|
||||
set_source_files_properties(${_it} PROPERTIES HEADER_FILE_ONLY TRUE)
|
||||
set(lyx_info_files ${lyx_info_files} ${_it})
|
||||
endif()
|
||||
endforeach()
|
||||
source_group(LyXInfoFiles FILES ${lyx_info_files})
|
||||
|
||||
file(GLOB cmake_files1 ${TOP_SRC_DIR}/development/cmake/*)
|
||||
file(GLOB cmake_files2 ${TOP_SRC_DIR}/development/cmake/modules/*)
|
||||
set(lyx_cmake_files)
|
||||
foreach(_it ${cmake_files1} ${cmake_files2})
|
||||
if(NOT IS_DIRECTORY ${_it})
|
||||
get_filename_component(name ${_it} NAME)
|
||||
if(NOT name STREQUAL CMakeLists.txt AND NOT ${_it} MATCHES "^/\\\\..*$;~$")
|
||||
set_source_files_properties(${_it} PROPERTIES HEADER_FILE_ONLY TRUE)
|
||||
set(lyx_cmake_files ${lyx_cmake_files} ${_it})
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
source_group(LyXCMakeFiles FILES ${lyx_cmake_files})
|
||||
endif()
|
||||
lyx_find_info_files(LyXInfoFiles ${TOP_SRC_DIR}/*)
|
||||
lyx_find_info_files(LyXCMakeFiles ${TOP_SRC_DIR}/development/cmake/*)
|
||||
lyx_find_info_files(LyXCMakeFiles ${TOP_SRC_DIR}/development/cmake/modules/*)
|
||||
|
||||
add_executable(${_lyx}
|
||||
${WIN32_CONSOLE}
|
||||
|
Loading…
Reference in New Issue
Block a user