diff --git a/CMakeLists.txt b/CMakeLists.txt index 06e95ecdcb..514a73a6a8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -972,9 +972,6 @@ if(MINGW AND USE_PCH) endif() endif() -# add the dtl module include path before we include Plugin folder -include_directories(submodules/dtl) - if(CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID MATCHES "AppleClang") set(IS_CLANG 1) @@ -1016,9 +1013,6 @@ if(USE_PCH) add_subdirectory(PCH) endif() -set(WITHOUT_INSTALL ON) -add_subdirectory(submodules/cc-wrapper) - # include the yaml-cpp directory include_directories("${CL_SRC_ROOT}/submodules/yaml-cpp/include") if(UNIX) @@ -1042,14 +1036,6 @@ add_subdirectory("${CL_SRC_ROOT}/submodules/assistant") if(WXC_APP) add_subdirectory(wxcrafter) else() - add_subdirectory(submodules/ctags) - install(TARGETS ctags DESTINATION ${CL_INSTALL_BIN}) - if(MINGW) - # build wx-config for Windows - add_subdirectory(submodules/wx-config-msys2) - install(TARGETS wx-config DESTINATION ${CL_INSTALL_BIN}) - endif() - if(NOT NO_CORE_PLUGINS) add_subdirectory(abbreviation) if(NOT DISABLE_CXX) @@ -1166,26 +1152,10 @@ if(BUILD_TESTING) endif(BUILD_TESTING) message(STATUS "CL_INSTALL_BIN is set to ${CL_INSTALL_BIN}") -install(TARGETS cc-wrapper DESTINATION ${CL_INSTALL_BIN}) if(NOT WXC_APP) # building CodeLite, install the SVGs codelite_install_svgs() - - if(NOT APPLE) - set_target_properties(ctags PROPERTIES OUTPUT_NAME "codelite-ctags") - install( - TARGETS ctags - DESTINATION ${CL_PREFIX}/bin - PERMISSIONS ${EXE_PERM}) - elseif(APPLE) - set_target_properties(ctags PROPERTIES OUTPUT_NAME "codelite-ctags") - install( - TARGETS ctags - DESTINATION ${CMAKE_BINARY_DIR}/codelite.app/Contents/MacOS - PERMISSIONS ${EXE_PERM}) - endif() - endif() if(MINGW) diff --git a/Plugin/CMakeLists.txt b/Plugin/CMakeLists.txt index 71fe5a2372..fb4abce530 100644 --- a/Plugin/CMakeLists.txt +++ b/Plugin/CMakeLists.txt @@ -100,6 +100,7 @@ endif() target_link_libraries( plugin + PUBLIC ${LINKER_OPTIONS} ${ADDITIONAL_LIBRARIES} ${GTK3_LIBRARIES} @@ -108,7 +109,9 @@ target_link_libraries( lexers_extra libcodelite lualib - LuaBridge) + LuaBridge + PRIVATE + dtl) if(USE_PCH) codelite_add_pch(plugin) diff --git a/submodules/CMakeLists.txt b/submodules/CMakeLists.txt index db44603d1f..69777fd40a 100644 --- a/submodules/CMakeLists.txt +++ b/submodules/CMakeLists.txt @@ -9,12 +9,40 @@ if(NOT CTAGS_SUBMODULE) message(FATAL_ERROR "Please make sure you have run `git submodule update --init`") endif() +# ###################################################################################################################### +# cc-wrapper +# ###################################################################################################################### +set(WITHOUT_INSTALL ON) +add_subdirectory(cc-wrapper) + +install(TARGETS cc-wrapper DESTINATION ${CL_INSTALL_BIN}) + # ###################################################################################################################### # cJSON # ###################################################################################################################### add_library(cJSON STATIC ${CMAKE_CURRENT_SOURCE_DIR}/cJSON/cJSON.c ${CMAKE_CURRENT_SOURCE_DIR}/cJSON/cJSON.h) target_include_directories(cJSON PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/cJSON) +# ###################################################################################################################### +# ctags +# ###################################################################################################################### +if(NOT WXC_APP) + add_subdirectory(ctags) + install(TARGETS ctags DESTINATION ${CL_INSTALL_BIN}) + set_target_properties(ctags PROPERTIES OUTPUT_NAME "codelite-ctags") + if(APPLE) + install( + TARGETS ctags + DESTINATION ${CMAKE_BINARY_DIR}/codelite.app/Contents/MacOS + PERMISSIONS ${EXE_PERM}) + else() + install( + TARGETS ctags + DESTINATION ${CL_PREFIX}/bin + PERMISSIONS ${EXE_PERM}) + endif() +endif() + # ###################################################################################################################### # doctest # a library header for test framework @@ -31,6 +59,22 @@ if(BUILD_TESTING) include(doctest) endif() +# ###################################################################################################################### +# dtl +# ###################################################################################################################### +add_library(dtl INTERFACE) +target_include_directories(dtl INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/dtl) + +# ###################################################################################################################### +# wx-config-msys2 +# ###################################################################################################################### + +if(NOT WXC_APP AND MINGW) + # build wx-config for Windows + add_subdirectory(wx-config-msys2) + install(TARGETS wx-config DESTINATION ${CL_INSTALL_BIN}) +endif() + # ###################################################################################################################### # For wxWidgets dependencies # ######################################################################################################################