Skip to content

Commit

Permalink
CMake fixes
Browse files Browse the repository at this point in the history
- Remove duplicate libraries during link
- Style format all cmake files

Signed-off-by: Eran Ifrah <[email protected]>
  • Loading branch information
eranif committed Jan 1, 2025
1 parent 8e8dd7f commit 68ba264
Show file tree
Hide file tree
Showing 57 changed files with 200 additions and 281 deletions.
2 changes: 1 addition & 1 deletion AutoSave/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ endif()

# Remove the "lib" prefix from the plugin name
set_target_properties(${PLUGIN_NAME} PROPERTIES PREFIX "")
target_link_libraries(${PLUGIN_NAME} ${LINKER_OPTIONS} ${wxWidgets_LIBRARIES} libcodelite plugin)
target_link_libraries(${PLUGIN_NAME} ${LINKER_OPTIONS} libcodelite plugin)

# Use CodeLite's macro: CL_INSTALL_PLUGIN which handles both OSX and Linux installation
cl_install_plugin(${PLUGIN_NAME})
2 changes: 1 addition & 1 deletion CMakePlugin/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@ endif()

# Codelite plugins doesn't use the "lib" prefix.
set_target_properties(${PLUGIN_NAME} PROPERTIES PREFIX "")
target_link_libraries(${PLUGIN_NAME} ${LINKER_OPTIONS} ${wxWidgets_LIBRARIES} libcodelite plugin)
target_link_libraries(${PLUGIN_NAME} ${LINKER_OPTIONS} libcodelite plugin)

cl_install_plugin(${PLUGIN_NAME})
2 changes: 1 addition & 1 deletion CallGraph/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ endif()

# Remove the "lib" prefix from the plugin name
set_target_properties(${PLUGIN_NAME} PROPERTIES PREFIX "")
target_link_libraries(${PLUGIN_NAME} ${LINKER_OPTIONS} ${wxWidgets_LIBRARIES} -L"${CL_LIBPATH}" libcodelite plugin)
target_link_libraries(${PLUGIN_NAME} ${LINKER_OPTIONS} -L"${CL_LIBPATH}" libcodelite plugin)
# Make sure that the plugin will not start build before 'plugin.so' is ready
add_dependencies(${PLUGIN_NAME} plugin)

Expand Down
2 changes: 1 addition & 1 deletion ChatAI/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ endif()

# Remove the "lib" prefix from the plugin name
set_target_properties(${PLUGIN_NAME} PROPERTIES PREFIX "")
target_link_libraries(${PLUGIN_NAME} ${LINKER_OPTIONS} ${wxWidgets_LIBRARIES} libcodelite plugin)
target_link_libraries(${PLUGIN_NAME} ${LINKER_OPTIONS} libcodelite plugin)

cl_install_plugin(${PLUGIN_NAME})

Expand Down
2 changes: 1 addition & 1 deletion CodeFormatter/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ endif()

# Remove the "lib" prefix from the plugin name
set_target_properties(${PLUGIN_NAME} PROPERTIES PREFIX "")
target_link_libraries(${PLUGIN_NAME} ${LINKER_OPTIONS} ${wxWidgets_LIBRARIES} libcodelite plugin)
target_link_libraries(${PLUGIN_NAME} ${LINKER_OPTIONS} libcodelite plugin)

cl_install_plugin(${PLUGIN_NAME})

Expand Down
37 changes: 17 additions & 20 deletions CodeLite/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,35 +12,34 @@ if(UNIX AND NOT APPLE)
endif(UNIX AND NOT APPLE)

# Flex files
FLEX_TARGET(CxxFlex "${CMAKE_SOURCE_DIR}/CodeLite/Cxx/CxxScanner.l" "${CMAKE_CURRENT_BINARY_DIR}/CxxScanner.cpp"
flex_target(CxxFlex "${CMAKE_SOURCE_DIR}/CodeLite/Cxx/CxxScanner.l" "${CMAKE_CURRENT_BINARY_DIR}/CxxScanner.cpp"
COMPILE_FLAGS "--noline --yylineno --batch")
FLEX_TARGET(IncludeFinderFlex "${CMAKE_SOURCE_DIR}/CodeLite/Cxx/include_finder.l" "${CMAKE_CURRENT_BINARY_DIR}/include_finder.cpp"
COMPILE_FLAGS "-Pinclf_ --noline --yylineno --batch")
FLEX_TARGET(PhpFlex "${CMAKE_SOURCE_DIR}/CodeLite/PHP/PhpLexer.l" "${CMAKE_CURRENT_BINARY_DIR}/PhpLexer.cpp"
flex_target(IncludeFinderFlex "${CMAKE_SOURCE_DIR}/CodeLite/Cxx/include_finder.l"
"${CMAKE_CURRENT_BINARY_DIR}/include_finder.cpp" COMPILE_FLAGS "-Pinclf_ --noline --yylineno --batch")
flex_target(PhpFlex "${CMAKE_SOURCE_DIR}/CodeLite/PHP/PhpLexer.l" "${CMAKE_CURRENT_BINARY_DIR}/PhpLexer.cpp"
COMPILE_FLAGS "-Pphp --noline --yylineno --batch")
FLEX_TARGET(XmlFlex "${CMAKE_SOURCE_DIR}/CodeLite/XML/XMLLexer.l" "${CMAKE_CURRENT_BINARY_DIR}/XmlLexer.cpp"
flex_target(XmlFlex "${CMAKE_SOURCE_DIR}/CodeLite/XML/XMLLexer.l" "${CMAKE_CURRENT_BINARY_DIR}/XmlLexer.cpp"
COMPILE_FLAGS "-Pxml --noline --yylineno --batch")

set(FlexSrcs "${FLEX_CxxFlex_OUTPUTS}" "${FLEX_IncludeFinderFlex_OUTPUTS}" "${FLEX_PhpFlex_OUTPUTS}" "${FLEX_XmlFlex_OUTPUTS}")
set(FlexSrcs "${FLEX_CxxFlex_OUTPUTS}" "${FLEX_IncludeFinderFlex_OUTPUTS}" "${FLEX_PhpFlex_OUTPUTS}"
"${FLEX_XmlFlex_OUTPUTS}")

file(GLOB_RECURSE SRCS "*.cpp" "*.h" "*.hpp")

add_library(libcodelite SHARED ${SRCS} ${FlexSrcs})

# Include paths
target_include_directories(libcodelite
PUBLIC
"${CL_SRC_ROOT}/sdk/wxsqlite3/include"
"${CL_SRC_ROOT}/CodeLite"
"${CL_SRC_ROOT}/CodeLite/ssh"
"${CL_SRC_ROOT}/PCH"
PRIVATE
"${CL_SRC_ROOT}/submodules/asio/asio/include"
"${CL_SRC_ROOT}/submodules/websocketpp"
)
target_include_directories(
libcodelite
PUBLIC "${CL_SRC_ROOT}/sdk/wxsqlite3/include" "${CL_SRC_ROOT}/CodeLite" "${CL_SRC_ROOT}/CodeLite/ssh"
"${CL_SRC_ROOT}/PCH"
PRIVATE "${CL_SRC_ROOT}/submodules/asio/asio/include" "${CL_SRC_ROOT}/submodules/websocketpp")
# Macros
if(WIN32)
target_compile_definitions(libcodelite PRIVATE WXMAKINGDLL_CL INTERFACE WXUSINGDLL_CL)
target_compile_definitions(
libcodelite
PRIVATE WXMAKINGDLL_CL
INTERFACE WXUSINGDLL_CL)
target_compile_definitions(libcodelite PUBLIC WXUSINGDLL_WXSQLITE3)
endif()

Expand Down Expand Up @@ -85,7 +84,6 @@ endif()
target_link_libraries(
libcodelite
${LINKER_OPTIONS}
${wxWidgets_LIBRARIES}
-L"${CL_LIBPATH}"
${SQLite3_LIBRARIES}
libCxxParser
Expand All @@ -94,8 +92,7 @@ target_link_libraries(
${GTK_LIBS}
${ADDITIONAL_LIBRARIES}
${LIBUCHARDET_LIB}
cJSON
)
cJSON)

if(MINGW)
set_target_properties(
Expand Down
2 changes: 1 addition & 1 deletion CodeLiteDiff/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,6 @@ endif()

# Codelite plugins doesn't use the "lib" prefix.
set_target_properties(${PLUGIN_NAME} PROPERTIES PREFIX "")
target_link_libraries(${PLUGIN_NAME} ${LINKER_OPTIONS} ${wxWidgets_LIBRARIES} libcodelite plugin)
target_link_libraries(${PLUGIN_NAME} ${LINKER_OPTIONS} libcodelite plugin)
# Installation destination
cl_install_plugin(${PLUGIN_NAME})
2 changes: 1 addition & 1 deletion ContinuousBuild/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ set_target_properties(${PLUGIN_NAME} PROPERTIES OUTPUT_NAME "ContinuousBuild")

# Remove the "lib" prefix from the plugin name
set_target_properties(${PLUGIN_NAME} PROPERTIES PREFIX "")
target_link_libraries(${PLUGIN_NAME} ${LINKER_OPTIONS} ${wxWidgets_LIBRARIES} libcodelite plugin)
target_link_libraries(${PLUGIN_NAME} ${LINKER_OPTIONS} libcodelite plugin)
cl_install_plugin(${PLUGIN_NAME})
2 changes: 1 addition & 1 deletion Copyright/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,5 @@ endif()

# Remove the "lib" prefix from the plugin name
set_target_properties(${PLUGIN_NAME} PROPERTIES PREFIX "")
target_link_libraries(${PLUGIN_NAME} ${LINKER_OPTIONS} ${wxWidgets_LIBRARIES} libcodelite plugin)
target_link_libraries(${PLUGIN_NAME} ${LINKER_OPTIONS} libcodelite plugin)
cl_install_plugin(${PLUGIN_NAME})
56 changes: 26 additions & 30 deletions CxxParser/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,43 +1,42 @@
project(CxxParser)

# Bison files
BISON_TARGET(CppScopeGrammarYacc "${CMAKE_SOURCE_DIR}/CxxParser/cpp_scope_grammar.y" "${CMAKE_CURRENT_BINARY_DIR}/cpp_scope_grammar.cpp"
DEFINES_FILE "${CMAKE_CURRENT_BINARY_DIR}/cpp_lexer.h"
COMPILE_FLAGS "-p cl_scope_ --no-lines")
BISON_TARGET(TypedefGrammarYacc "${CMAKE_SOURCE_DIR}/CxxParser/typedef_grammar.y" "${CMAKE_CURRENT_BINARY_DIR}/typedef_parser.cpp"
COMPILE_FLAGS "-p cl_typedef_ --no-lines")
BISON_TARGET(CppVariablesGrammarYacc "${CMAKE_SOURCE_DIR}/CxxParser/cpp_variables_grammar.y" "${CMAKE_CURRENT_BINARY_DIR}/var_parser.cpp"
COMPILE_FLAGS "-p cl_var_ --no-lines")
BISON_TARGET(ExprGrammarYacc "${CMAKE_SOURCE_DIR}/CxxParser/expr_grammar.y" "${CMAKE_CURRENT_BINARY_DIR}/cpp_expr_parser.cpp"
COMPILE_FLAGS "-p cl_expr_ --no-lines")
BISON_TARGET(CppFuncParserYacc "${CMAKE_SOURCE_DIR}/CxxParser/cpp_func_parser.y" "${CMAKE_CURRENT_BINARY_DIR}/cpp_func_parser.cpp"
COMPILE_FLAGS "-p cl_func_ --no-lines")
bison_target(
CppScopeGrammarYacc "${CMAKE_SOURCE_DIR}/CxxParser/cpp_scope_grammar.y"
"${CMAKE_CURRENT_BINARY_DIR}/cpp_scope_grammar.cpp"
DEFINES_FILE "${CMAKE_CURRENT_BINARY_DIR}/cpp_lexer.h"
COMPILE_FLAGS "-p cl_scope_ --no-lines")
bison_target(TypedefGrammarYacc "${CMAKE_SOURCE_DIR}/CxxParser/typedef_grammar.y"
"${CMAKE_CURRENT_BINARY_DIR}/typedef_parser.cpp" COMPILE_FLAGS "-p cl_typedef_ --no-lines")
bison_target(CppVariablesGrammarYacc "${CMAKE_SOURCE_DIR}/CxxParser/cpp_variables_grammar.y"
"${CMAKE_CURRENT_BINARY_DIR}/var_parser.cpp" COMPILE_FLAGS "-p cl_var_ --no-lines")
bison_target(ExprGrammarYacc "${CMAKE_SOURCE_DIR}/CxxParser/expr_grammar.y"
"${CMAKE_CURRENT_BINARY_DIR}/cpp_expr_parser.cpp" COMPILE_FLAGS "-p cl_expr_ --no-lines")
bison_target(CppFuncParserYacc "${CMAKE_SOURCE_DIR}/CxxParser/cpp_func_parser.y"
"${CMAKE_CURRENT_BINARY_DIR}/cpp_func_parser.cpp" COMPILE_FLAGS "-p cl_func_ --no-lines")

set(BisonSrcs
"${BISON_CppScopeGrammarYacc_OUTPUTS}"
"${BISON_TypedefGrammarYacc_OUTPUTS}"
"${BISON_CppVariablesGrammarYacc_OUTPUTS}"
"${BISON_ExprGrammarYacc_OUTPUTS}"
"${BISON_CppFuncParserYacc_OUTPUTS}"
)
"${BISON_CppScopeGrammarYacc_OUTPUTS}" "${BISON_TypedefGrammarYacc_OUTPUTS}"
"${BISON_CppVariablesGrammarYacc_OUTPUTS}" "${BISON_ExprGrammarYacc_OUTPUTS}" "${BISON_CppFuncParserYacc_OUTPUTS}")

# Flex files
FLEX_TARGET(CppFlex "${CMAKE_SOURCE_DIR}/CxxParser/cpp.l" "${CMAKE_CURRENT_BINARY_DIR}/cpp.cpp"
flex_target(CppFlex "${CMAKE_SOURCE_DIR}/CxxParser/cpp.l" "${CMAKE_CURRENT_BINARY_DIR}/cpp.cpp"
COMPILE_FLAGS "-Pcl_scope_ --noline --yylineno --batch")
# Increase YY_BUF_SIZE from 16384 to 16384*5
set_source_files_properties("${FLEX_CppFlex_OUTPUTS}" PROPERTIES COMPILE_DEFINITIONS "YY_BUF_SIZE=(16384*5)")
FLEX_TARGET(ExprLexerFlex "${CMAKE_SOURCE_DIR}/CxxParser/expr_lexer.l" "${CMAKE_CURRENT_BINARY_DIR}/expr_lexer.cpp"
flex_target(ExprLexerFlex "${CMAKE_SOURCE_DIR}/CxxParser/expr_lexer.l" "${CMAKE_CURRENT_BINARY_DIR}/expr_lexer.cpp"
COMPILE_FLAGS "-Pcl_expr_ --noline --yylineno --batch")
# Increase YY_BUF_SIZE from 16384 to 16384*5
set_source_files_properties("${FLEX_ExprLexerFlex_OUTPUTS}" PROPERTIES COMPILE_DEFINITIONS "YY_BUF_SIZE=(16384*5)")

ADD_FLEX_BISON_DEPENDENCY(CppFlex CppScopeGrammarYacc)
ADD_FLEX_BISON_DEPENDENCY(ExprLexerFlex CppScopeGrammarYacc)
add_flex_bison_dependency(CppFlex CppScopeGrammarYacc)
add_flex_bison_dependency(ExprLexerFlex CppScopeGrammarYacc)

set(FlexSrcs "${FLEX_CppFlex_OUTPUTS}" "${FLEX_ExprLexerFlex_OUTPUTS}")

# Define the outputs
add_library(libCxxParser STATIC
add_library(
libCxxParser STATIC
cl_typedef.h
code_completion_api.h
expression_result.cpp
Expand All @@ -47,25 +46,22 @@ add_library(libCxxParser STATIC
variable.cpp
variable.h
${FlexSrcs}
${BisonSrcs}
)
${BisonSrcs})

if(UNIX OR APPLE)
set_target_properties(libCxxParser PROPERTIES POSITION_INDEPENDENT_CODE ON)
endif()

# Include paths
target_include_directories(libCxxParser
target_include_directories(
libCxxParser
PUBLIC "${CL_SRC_ROOT}/CxxParser"
PRIVATE "${CMAKE_CURRENT_BINARY_DIR}"
)
PRIVATE "${CMAKE_CURRENT_BINARY_DIR}")
if(WIN32)
target_compile_definitions(libCxxParser PRIVATE WXMAKINGDLL_CL)
endif()

# "testing" application
add_executable(CxxParser
main.cpp
)
add_executable(CxxParser main.cpp)

target_link_libraries(CxxParser PRIVATE libCxxParser)
2 changes: 1 addition & 1 deletion CxxParserTests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ if(USE_PCH)
endif()

# Remove the "lib" prefix from the plugin name
target_link_libraries(CxxLocalVariables ${LINKER_OPTIONS} ${wxWidgets_LIBRARIES} libcodelite plugin wxsqlite3)
target_link_libraries(CxxLocalVariables ${LINKER_OPTIONS} libcodelite plugin wxsqlite3)
add_definitions(-DCXX_TEST_DIR=\"${CL_SRC_ROOT}/CxxParserTests/Test/\")
cl_install_executable(CxxLocalVariables)

Expand Down
4 changes: 1 addition & 3 deletions DatabaseExplorer/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,7 @@ if(USE_PCH AND NOT MINGW)
endif()

# Include paths
include_directories(
"${CL_SRC_ROOT}/sdk/databaselayer/include")
include_directories("${CL_SRC_ROOT}/sdk/databaselayer/include")

add_definitions(-DDBL_USE_SQLITE)

Expand Down Expand Up @@ -102,7 +101,6 @@ endif()
target_link_libraries(
${PLUGIN_NAME}
${LINKER_OPTIONS}
${wxWidgets_LIBRARIES}
${GTK_LIBS}
libcodelite
plugin
Expand Down
9 changes: 1 addition & 8 deletions DebugAdapterClient/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,7 @@ add_library(${PLUGIN_NAME} SHARED ${PLUGIN_SRCS})

# Codelite plugins doesn't use the "lib" prefix.
set_target_properties(${PLUGIN_NAME} PROPERTIES PREFIX "")
target_link_libraries(
${PLUGIN_NAME}
${LINKER_OPTIONS}
${wxWidgets_LIBRARIES}
${LIBLLDB}
libcodelite
plugin
dapcxx)
target_link_libraries(${PLUGIN_NAME} ${LINKER_OPTIONS} ${LIBLLDB} libcodelite plugin dapcxx)
target_include_directories(${PLUGIN_NAME} PRIVATE "${CL_SRC_ROOT}/submodules/wxdap")
# Installation destination
cl_install_plugin(${PLUGIN_NAME})
Expand Down
2 changes: 1 addition & 1 deletion Debugger/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ endif()

# Remove the "lib" prefix from the plugin name
set_target_properties(${PLUGIN_NAME} PROPERTIES PREFIX "")
target_link_libraries(${PLUGIN_NAME} ${LINKER_OPTIONS} ${wxWidgets_LIBRARIES} libcodelite plugin libgdbparser)
target_link_libraries(${PLUGIN_NAME} ${LINKER_OPTIONS} libcodelite plugin libgdbparser)

cl_install_debugger(${PLUGIN_NAME})
2 changes: 1 addition & 1 deletion Docker/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ endif()

# Remove the "lib" prefix from the plugin name
set_target_properties(${PLUGIN_NAME} PROPERTIES PREFIX "")
target_link_libraries(${PLUGIN_NAME} ${LINKER_OPTIONS} ${wxWidgets_LIBRARIES} libcodelite plugin)
target_link_libraries(${PLUGIN_NAME} ${LINKER_OPTIONS} libcodelite plugin)

# Use CodeLite's macro: CL_INSTALL_PLUGIN which handles both OSX and Linux installation
cl_install_plugin(${PLUGIN_NAME})
2 changes: 1 addition & 1 deletion EOSWiki/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ endif()

# Remove the "lib" prefix from the plugin name
set_target_properties(${PLUGIN_NAME} PROPERTIES PREFIX "")
target_link_libraries(${PLUGIN_NAME} ${LINKER_OPTIONS} ${wxWidgets_LIBRARIES} libcodelite plugin)
target_link_libraries(${PLUGIN_NAME} ${LINKER_OPTIONS} libcodelite plugin)

# Use CodeLite's macro: CL_INSTALL_PLUGIN which handles both OSX and Linux installation
cl_install_plugin(${PLUGIN_NAME})
Expand Down
2 changes: 1 addition & 1 deletion EditorConfigPlugin/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ endif()

# Remove the "lib" prefix from the plugin name
set_target_properties(${PLUGIN_NAME} PROPERTIES PREFIX "")
target_link_libraries(${PLUGIN_NAME} ${LINKER_OPTIONS} ${wxWidgets_LIBRARIES} libcodelite plugin)
target_link_libraries(${PLUGIN_NAME} ${LINKER_OPTIONS} libcodelite plugin)

# Use CodeLite's macro: CL_INSTALL_PLUGIN which handles both OSX and Linux installation
cl_install_plugin(${PLUGIN_NAME})
2 changes: 1 addition & 1 deletion ExternalTools/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ endif()
# Remove the "lib" prefix from the plugin name
set_target_properties(${PLUGIN_NAME} PROPERTIES PREFIX "")
set_target_properties(${PLUGIN_NAME} PROPERTIES PREFIX "")
target_link_libraries(${PLUGIN_NAME} ${LINKER_OPTIONS} ${wxWidgets_LIBRARIES} libcodelite plugin)
target_link_libraries(${PLUGIN_NAME} ${LINKER_OPTIONS} libcodelite plugin)
# Installation destination
cl_install_plugin(${PLUGIN_NAME})
2 changes: 1 addition & 1 deletion Gizmos/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ endif()

# Remove the "lib" prefix from the plugin name
set_target_properties(${PLUGIN_NAME} PROPERTIES PREFIX "")
target_link_libraries(${PLUGIN_NAME} ${LINKER_OPTIONS} ${wxWidgets_LIBRARIES} libcodelite plugin)
target_link_libraries(${PLUGIN_NAME} ${LINKER_OPTIONS} libcodelite plugin)
# Installation destination
cl_install_plugin(${PLUGIN_NAME})
2 changes: 1 addition & 1 deletion HelpPlugin/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ endif()

# Remove the "lib" prefix from the plugin name
set_target_properties(${PLUGIN_NAME} PROPERTIES PREFIX "")
target_link_libraries(${PLUGIN_NAME} ${LINKER_OPTIONS} ${wxWidgets_LIBRARIES} libcodelite plugin)
target_link_libraries(${PLUGIN_NAME} ${LINKER_OPTIONS} libcodelite plugin)

# Use CodeLite's macro: CL_INSTALL_PLUGIN which handles both OSX and Linux installation
cl_install_plugin(${PLUGIN_NAME})
2 changes: 1 addition & 1 deletion LanguageServer/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ endif()

# Remove the "lib" prefix from the plugin name
set_target_properties(${PLUGIN_NAME} PROPERTIES PREFIX "")
target_link_libraries(${PLUGIN_NAME} ${LINKER_OPTIONS} ${wxWidgets_LIBRARIES} libcodelite plugin)
target_link_libraries(${PLUGIN_NAME} ${LINKER_OPTIONS} libcodelite plugin)

# Use CodeLite's macro: CL_INSTALL_PLUGIN which handles both OSX and Linux installation
cl_install_plugin(${PLUGIN_NAME})
Expand Down
3 changes: 0 additions & 3 deletions LiteEditor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ if(GTK2_FOUND)
codelite
${LINKER_OPTIONS}
${GTK2_LIBRARIES}
${wxWidgets_LIBRARIES}
${CLANG_LIBRARY}
-L"${CL_LIBPATH}"
libcodelite
Expand All @@ -75,7 +74,6 @@ elseif(GTK3_FOUND)
codelite
${LINKER_OPTIONS}
${GTK3_LIBRARIES}
${wxWidgets_LIBRARIES}
${CLANG_LIBRARY}
-L"${CL_LIBPATH}"
libcodelite
Expand All @@ -85,7 +83,6 @@ else()
target_link_libraries(
codelite
${LINKER_OPTIONS}
${wxWidgets_LIBRARIES}
${CLANG_LIBRARY}
-L"${CL_LIBPATH}"
libcodelite
Expand Down
2 changes: 1 addition & 1 deletion MacBundler/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ add_library(${PLUGIN_NAME} SHARED ${SRCS})

# Remove the "lib" prefix from the plugin name
set_target_properties(${PLUGIN_NAME} PROPERTIES PREFIX "")
target_link_libraries(${PLUGIN_NAME} ${LINKER_OPTIONS} ${wxWidgets_LIBRARIES} libcodelite plugin)
target_link_libraries(${PLUGIN_NAME} ${LINKER_OPTIONS} libcodelite plugin)

cl_install_plugin(${PLUGIN_NAME})
2 changes: 1 addition & 1 deletion MemCheck/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ if(UNIX AND NOT APPLE)

# Remove the "lib" prefix from the plugin name
set_target_properties(${PLUGIN_NAME} PROPERTIES PREFIX "")
target_link_libraries(${PLUGIN_NAME} ${LINKER_OPTIONS} ${wxWidgets_LIBRARIES} -L"${CL_LIBPATH}" libcodelite plugin)
target_link_libraries(${PLUGIN_NAME} ${LINKER_OPTIONS} -L"${CL_LIBPATH}" libcodelite plugin)

# Make sure that the plugin will not start build before 'plugin.so' is ready
add_dependencies(${PLUGIN_NAME} plugin)
Expand Down
2 changes: 1 addition & 1 deletion Outline/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ endif()

# Remove the "lib" prefix from the plugin name
set_target_properties(${PLUGIN_NAME} PROPERTIES PREFIX "")
target_link_libraries(${PLUGIN_NAME} ${LINKER_OPTIONS} ${wxWidgets_LIBRARIES} libcodelite plugin)
target_link_libraries(${PLUGIN_NAME} ${LINKER_OPTIONS} libcodelite plugin)
# Installation destination
cl_install_plugin(${PLUGIN_NAME})
Loading

0 comments on commit 68ba264

Please sign in to comment.