-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
wineditline: address post-merge review comments #8867
Merged
conan-center-bot
merged 5 commits into
conan-io:master
from
friendlyanon:package/wineditline
Feb 2, 2022
Merged
Changes from 3 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
534bd78
Nuke CMake info not present upstream
friendlyanon 0178e51
Simplify calls to CMake helper
friendlyanon 0199b40
Patch the CMakeLists.txt instead of providing one
friendlyanon 5d7ca01
Move Conan stuff from patches to a wrapper CML
friendlyanon 30643b2
Use target from CMake config with Conan defaults
friendlyanon File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
--- CMakeLists.txt | ||
+++ CMakeLists.txt | ||
@@ -1,25 +1,19 @@ | ||
-cmake_minimum_required (VERSION 2.6) | ||
-project (WinEditLine) | ||
-set (WinEditLine_VERSION_MAJOR 2) | ||
-set (WinEditLine_VERSION_MINOR 2) | ||
-if (MSVC AND MSVC_USE_STATIC_RUNTIME) | ||
-foreach(flag_var | ||
- CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE | ||
- CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO) | ||
- if(${flag_var} MATCHES "/MD") | ||
- string(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}") | ||
- endif(${flag_var} MATCHES "/MD") | ||
-endforeach(flag_var) | ||
-endif() | ||
-if(NOT DEFINED LIB_SUFFIX) | ||
- if(CMAKE_SIZEOF_VOID_P MATCHES 4) | ||
- set(LIB_SUFFIX "32") | ||
- else() | ||
- set(LIB_SUFFIX "64") | ||
- endif() | ||
-endif() | ||
-configure_file ( | ||
- "${PROJECT_SOURCE_DIR}/src/config.h.in" | ||
- "${PROJECT_BINARY_DIR}/config.h" | ||
+cmake_minimum_required(VERSION 3.1) | ||
+ | ||
+project(WinEditLine C) | ||
+ | ||
+include("${CMAKE_BINARY_DIR}/conanbuildinfo.cmake") | ||
+conan_basic_setup(TARGETS) | ||
+ | ||
+add_library(edit src/editline.c src/fn_complete.c src/history.c src/libedit.def) | ||
+target_include_directories(edit PRIVATE src) | ||
+ | ||
+include(GNUInstallDirs) | ||
+ | ||
+install( | ||
+ TARGETS edit | ||
+ RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}" | ||
+ ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}" | ||
) | ||
-add_subdirectory (src) | ||
+ | ||
+install(DIRECTORY src/editline DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,8 @@ | ||
cmake_minimum_required(VERSION 3.1) | ||
project(test_package C) | ||
|
||
find_package(wineditline REQUIRED CONFIG) | ||
|
||
include("${CMAKE_BINARY_DIR}/conanbuildinfo.cmake") | ||
conan_basic_setup(TARGETS) | ||
|
||
add_executable(test_package test_package.c) | ||
target_link_libraries(test_package PRIVATE wineditline::wineditline) | ||
target_link_libraries(test_package PRIVATE CONAN_PKG::wineditline) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would isolate this part in the usual CMakeLists wrapper.