Skip to content

Commit c5636c6

Browse files
authored
[cleanup] CMake submodules (#3852)
1 parent 813a2bd commit c5636c6

File tree

3 files changed

+48
-31
lines changed

3 files changed

+48
-31
lines changed

CMakeLists.txt

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -972,9 +972,6 @@ if(MINGW AND USE_PCH)
972972
endif()
973973
endif()
974974
975-
# add the dtl module include path before we include Plugin folder
976-
include_directories(submodules/dtl)
977-
978975
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID MATCHES
979976
"AppleClang")
980977
set(IS_CLANG 1)
@@ -1016,9 +1013,6 @@ if(USE_PCH)
10161013
add_subdirectory(PCH)
10171014
endif()
10181015
1019-
set(WITHOUT_INSTALL ON)
1020-
add_subdirectory(submodules/cc-wrapper)
1021-
10221016
# include the yaml-cpp directory
10231017
include_directories("${CL_SRC_ROOT}/submodules/yaml-cpp/include")
10241018
if(UNIX)
@@ -1042,14 +1036,6 @@ add_subdirectory("${CL_SRC_ROOT}/submodules/assistant")
10421036
if(WXC_APP)
10431037
add_subdirectory(wxcrafter)
10441038
else()
1045-
add_subdirectory(submodules/ctags)
1046-
install(TARGETS ctags DESTINATION ${CL_INSTALL_BIN})
1047-
if(MINGW)
1048-
# build wx-config for Windows
1049-
add_subdirectory(submodules/wx-config-msys2)
1050-
install(TARGETS wx-config DESTINATION ${CL_INSTALL_BIN})
1051-
endif()
1052-
10531039
if(NOT NO_CORE_PLUGINS)
10541040
add_subdirectory(abbreviation)
10551041
if(NOT DISABLE_CXX)
@@ -1166,26 +1152,10 @@ if(BUILD_TESTING)
11661152
endif(BUILD_TESTING)
11671153
11681154
message(STATUS "CL_INSTALL_BIN is set to ${CL_INSTALL_BIN}")
1169-
install(TARGETS cc-wrapper DESTINATION ${CL_INSTALL_BIN})
11701155
11711156
if(NOT WXC_APP)
11721157
# building CodeLite, install the SVGs
11731158
codelite_install_svgs()
1174-
1175-
if(NOT APPLE)
1176-
set_target_properties(ctags PROPERTIES OUTPUT_NAME "codelite-ctags")
1177-
install(
1178-
TARGETS ctags
1179-
DESTINATION ${CL_PREFIX}/bin
1180-
PERMISSIONS ${EXE_PERM})
1181-
elseif(APPLE)
1182-
set_target_properties(ctags PROPERTIES OUTPUT_NAME "codelite-ctags")
1183-
install(
1184-
TARGETS ctags
1185-
DESTINATION ${CMAKE_BINARY_DIR}/codelite.app/Contents/MacOS
1186-
PERMISSIONS ${EXE_PERM})
1187-
endif()
1188-
11891159
endif()
11901160
11911161
if(MINGW)

Plugin/CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ endif()
100100

101101
target_link_libraries(
102102
plugin
103+
PUBLIC
103104
${LINKER_OPTIONS}
104105
${ADDITIONAL_LIBRARIES}
105106
${GTK3_LIBRARIES}
@@ -108,7 +109,9 @@ target_link_libraries(
108109
lexers_extra
109110
libcodelite
110111
lualib
111-
LuaBridge)
112+
LuaBridge
113+
PRIVATE
114+
dtl)
112115

113116
if(USE_PCH)
114117
codelite_add_pch(plugin)

submodules/CMakeLists.txt

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,40 @@ if(NOT CTAGS_SUBMODULE)
99
message(FATAL_ERROR "Please make sure you have run `git submodule update --init`")
1010
endif()
1111

12+
# ######################################################################################################################
13+
# cc-wrapper
14+
# ######################################################################################################################
15+
set(WITHOUT_INSTALL ON)
16+
add_subdirectory(cc-wrapper)
17+
18+
install(TARGETS cc-wrapper DESTINATION ${CL_INSTALL_BIN})
19+
1220
# ######################################################################################################################
1321
# cJSON
1422
# ######################################################################################################################
1523
add_library(cJSON STATIC ${CMAKE_CURRENT_SOURCE_DIR}/cJSON/cJSON.c ${CMAKE_CURRENT_SOURCE_DIR}/cJSON/cJSON.h)
1624
target_include_directories(cJSON PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/cJSON)
1725

26+
# ######################################################################################################################
27+
# ctags
28+
# ######################################################################################################################
29+
if(NOT WXC_APP)
30+
add_subdirectory(ctags)
31+
install(TARGETS ctags DESTINATION ${CL_INSTALL_BIN})
32+
set_target_properties(ctags PROPERTIES OUTPUT_NAME "codelite-ctags")
33+
if(APPLE)
34+
install(
35+
TARGETS ctags
36+
DESTINATION ${CMAKE_BINARY_DIR}/codelite.app/Contents/MacOS
37+
PERMISSIONS ${EXE_PERM})
38+
else()
39+
install(
40+
TARGETS ctags
41+
DESTINATION ${CL_PREFIX}/bin
42+
PERMISSIONS ${EXE_PERM})
43+
endif()
44+
endif()
45+
1846
# ######################################################################################################################
1947
# doctest
2048
# a library header for test framework
@@ -31,6 +59,22 @@ if(BUILD_TESTING)
3159
include(doctest)
3260
endif()
3361

62+
# ######################################################################################################################
63+
# dtl
64+
# ######################################################################################################################
65+
add_library(dtl INTERFACE)
66+
target_include_directories(dtl INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/dtl)
67+
68+
# ######################################################################################################################
69+
# wx-config-msys2
70+
# ######################################################################################################################
71+
72+
if(NOT WXC_APP AND MINGW)
73+
# build wx-config for Windows
74+
add_subdirectory(wx-config-msys2)
75+
install(TARGETS wx-config DESTINATION ${CL_INSTALL_BIN})
76+
endif()
77+
3478
# ######################################################################################################################
3579
# For wxWidgets dependencies
3680
# ######################################################################################################################

0 commit comments

Comments
 (0)