Skip to content

Commit 8bcb563

Browse files
committed
[cleanup][CMake] Move CMake's code from yaml-cpp into submodules/CMakeLists.txt
1 parent 0c4a5ea commit 8bcb563

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

CMakeLists.txt

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -993,11 +993,6 @@ include_directories(submodules/cJSON)
993993
add_subdirectory(sdk/wxsqlite3)
994994
add_subdirectory(sdk/databaselayer)
995995
996-
if(NOT APPLE)
997-
add_subdirectory(submodules/yaml-cpp)
998-
set(LIBYAML_CPP "yaml-cpp")
999-
endif()
1000-
1001996
if(DEBUG_BUILD)
1002997
set(CMAKE_CXX_FLAGS_RELEASE "")
1003998
message(STATUS "CMAKE_CXX_FLAGS_RELEASE=${CMAKE_CXX_FLAGS_RELEASE}")
@@ -1013,8 +1008,6 @@ if(USE_PCH)
10131008
add_subdirectory(PCH)
10141009
endif()
10151010
1016-
# include the yaml-cpp directory
1017-
include_directories("${CL_SRC_ROOT}/submodules/yaml-cpp/include")
10181011
if(UNIX)
10191012
# On Windows, this is default. Set it OFF for Linux / macOS as well
10201013
set(BUILD_SHARED_LIBS OFF)

Plugin/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,13 +104,13 @@ target_link_libraries(
104104
${LINKER_OPTIONS}
105105
${ADDITIONAL_LIBRARIES}
106106
${GTK3_LIBRARIES}
107-
${LIBYAML_CPP}
108107
-L"${CL_LIBPATH}"
109108
lexers_extra
110109
libcodelite
111110
lualib
112111
LuaBridge
113112
PRIVATE
113+
${LIBYAML_CPP}
114114
dtl)
115115

116116
if(USE_PCH)

submodules/CMakeLists.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,17 @@ if(NOT WXC_APP AND MINGW)
4646
install(TARGETS wx-config DESTINATION ${CL_INSTALL_BIN})
4747
endif()
4848

49+
# ######################################################################################################################
50+
# yaml-cpp
51+
# ######################################################################################################################
52+
if(NOT APPLE)
53+
set(YAML_BUILD_SHARED_LIBS OFF)
54+
add_subdirectory(yaml-cpp)
55+
set(LIBYAML_CPP "yaml-cpp::yaml-cpp")
56+
endif()
57+
58+
# ######################################################################################################################
59+
4960
# ######################################################################################################################
5061
# For wxWidgets dependencies
5162
# ######################################################################################################################

0 commit comments

Comments
 (0)