mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 01:59:02 +00:00
CMake: Put projects into subdirs
This patch puts all projects into subfolders (at least for MSVS). In this way, there is a better overview (especially if the number of test projects will be increasing).
This commit is contained in:
parent
892e237fe1
commit
0cd8c03d17
@ -294,6 +294,7 @@ endif()
|
||||
add_custom_target(lyx_version ALL
|
||||
COMMAND ${CMAKE_COMMAND} -DTOP_SRC_DIR=${TOP_SRC_DIR} -DTOP_CMAKE_PATH=${TOP_CMAKE_PATH} -DTOP_BINARY_DIR=${TOP_BINARY_DIR} -DLYX_DATE=${LYX_DATE} -P ${TOP_SCRIPT_PATH}/LyXGetVersion.cmake
|
||||
)
|
||||
set_target_properties(lyx_version PROPERTIES FOLDER "applications")
|
||||
|
||||
if(APPLE)
|
||||
set(osx_bundle_program_name ${PACKAGE_BASE}${PROGRAM_SUFFIX})
|
||||
|
@ -21,4 +21,5 @@ set(boost_regex_sources
|
||||
lyx_add_path(boost_regex_sources ${TOP_SRC_DIR}/boost/libs/regex/src)
|
||||
|
||||
add_library(boost_regex STATIC ${boost_regex_sources})
|
||||
set_target_properties(boost_regex PROPERTIES FOLDER "3rd_party")
|
||||
|
||||
|
@ -23,3 +23,4 @@ else()
|
||||
add_library(boost_signals STATIC ${_allinone_files})
|
||||
endif()
|
||||
|
||||
set_target_properties(boost_signals PROPERTIES FOLDER "3rd_party")
|
||||
|
@ -59,6 +59,7 @@ MACRO(GETTEXT_CREATE_TRANSLATIONS _potFile _firstPoFile)
|
||||
ENDFOREACH (_currentPoFile )
|
||||
|
||||
ADD_CUSTOM_TARGET(translations ${_addToAll} DEPENDS ${_gmoFiles})
|
||||
set_target_properties(translations PROPERTIES FOLDER "i18n")
|
||||
|
||||
ENDMACRO(GETTEXT_CREATE_TRANSLATIONS )
|
||||
|
||||
|
@ -51,6 +51,7 @@ macro(add_gettext_python _par _dir)
|
||||
COMMENT "${LYX_PYTHON_EXECUTABLE} ${TOP_SRC_DIR}/po/lyx_pot.py -b ${TOP_SRC_DIR} -o ${_dst} -t ${_par1} --src_file=${_src_files}"
|
||||
)
|
||||
ADD_CUSTOM_TARGET(layouttranslations1 DEPENDS "${_dst}")
|
||||
set_target_properties(layouttranslations1 PROPERTIES FOLDER "i18n")
|
||||
if (LYX_DATA_SUBDIR STREQUAL "")
|
||||
install(FILES "${TOP_SRC_DIR}/lib/layouttranslations" DESTINATION .)
|
||||
else()
|
||||
@ -194,5 +195,6 @@ GETTEXT_CREATE_TRANSLATIONS(${CMAKE_CURRENT_BINARY_DIR}/${_lyxname}.pot ${_addAL
|
||||
# Create a new target to remerge po files
|
||||
# ALL omitted here, to prevent from automatic creation
|
||||
ADD_CUSTOM_TARGET(update-po DEPENDS ${LYX_UPDATED_PO_FILES})
|
||||
set_target_properties(update-po PROPERTIES FOLDER "i18n")
|
||||
add_dependencies(update-po translations)
|
||||
|
||||
|
@ -8,6 +8,9 @@ project(${_lyx})
|
||||
|
||||
include_directories(${TOP_SRC_DIR}/src)
|
||||
|
||||
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
||||
set_property(GLOBAL PROPERTY PREDEFINED_TARGETS_FOLDER "CMakeTargets")
|
||||
|
||||
add_subdirectory(frontends)
|
||||
add_subdirectory(graphics)
|
||||
add_subdirectory(insets)
|
||||
@ -118,6 +121,8 @@ add_executable(${_lyx}
|
||||
|
||||
add_dependencies(${_lyx} lyx_version)
|
||||
|
||||
set_target_properties(${_lyx} PROPERTIES FOLDER "applications/LyX")
|
||||
|
||||
lyx_add_gcc_pch(${_lyx})
|
||||
|
||||
target_link_libraries(${_lyx}
|
||||
|
@ -20,6 +20,7 @@ else()
|
||||
lyx_const_touched_files(_allinone frontends_sources)
|
||||
add_library(frontends ${library_type} ${_allinone_files})
|
||||
endif()
|
||||
set_target_properties(frontends PROPERTIES FOLDER "applications/LyX")
|
||||
|
||||
target_link_libraries(frontends ${Lyx_Boost_Libraries})
|
||||
|
||||
|
@ -52,6 +52,7 @@ if(LYX_MERGE_FILES)
|
||||
else()
|
||||
add_library(frontend_qt4 ${library_type} ${frontends_qt4_sources} ${frontends_qt4_headers} ${ui_files} ${resource_files})
|
||||
endif()
|
||||
set_target_properties(frontend_qt4 PROPERTIES FOLDER "applications/LyX")
|
||||
|
||||
|
||||
target_link_libraries(frontend_qt4
|
||||
|
@ -22,6 +22,7 @@ else()
|
||||
lyx_const_touched_files(_allinone graphics_sources)
|
||||
add_library(graphics ${library_type} ${_allinone_files})
|
||||
endif()
|
||||
set_target_properties(graphics PROPERTIES FOLDER "applications/LyX")
|
||||
|
||||
lyx_add_gcc_pch(graphics)
|
||||
|
||||
|
@ -22,6 +22,7 @@ else()
|
||||
lyx_const_touched_files(_allinone insets_sources)
|
||||
add_library(insets ${library_type} ${_allinone_files})
|
||||
endif()
|
||||
set_target_properties(insets PROPERTIES FOLDER "applications/LyX")
|
||||
|
||||
lyx_add_gcc_pch(insets)
|
||||
|
||||
|
@ -23,6 +23,7 @@ else()
|
||||
lyx_const_touched_files(_allinone mathed_sources)
|
||||
add_library(mathed ${library_type} ${_allinone_files})
|
||||
endif()
|
||||
set_target_properties(mathed PROPERTIES FOLDER "applications/LyX")
|
||||
|
||||
lyx_add_gcc_pch(mathed)
|
||||
|
||||
|
@ -74,6 +74,7 @@ else()
|
||||
add_library(support ${library_type} ${_allinone_files} ${support_separate}
|
||||
${support_mythes_sources} ${support_linkback_sources} ${support_headers} ${dont_merge})
|
||||
endif()
|
||||
set_target_properties(support PROPERTIES FOLDER "applications/LyX")
|
||||
|
||||
target_link_libraries(support ${Lyx_Boost_Libraries} ${QT_QTCORE_LIBRARY} ${ZLIB_LIBRARY})
|
||||
|
||||
|
@ -43,6 +43,8 @@ foreach(_src ${check_PROGRAMS})
|
||||
-DInput=${src_data_file}
|
||||
-DOutput=${created_data_file}
|
||||
-P "${TOP_SRC_DIR}/src/support/tests/supporttest.cmake")
|
||||
|
||||
set_target_properties(${_src} PROPERTIES FOLDER "tests/support")
|
||||
endforeach()
|
||||
|
||||
|
||||
|
@ -43,6 +43,7 @@ else()
|
||||
lyx_const_touched_files(_allinone_linked LINKED_sources)
|
||||
add_executable(${_tex2lyx} ${_allinone_files} ${_allinone_linked_files} ${FILE_RC})
|
||||
endif()
|
||||
set_target_properties(${_tex2lyx} PROPERTIES FOLDER "applications/TeX2LyX")
|
||||
|
||||
target_link_libraries(${_tex2lyx}
|
||||
support
|
||||
|
Loading…
Reference in New Issue
Block a user