-
Notifications
You must be signed in to change notification settings - Fork 995
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
Less Dependencies? #52
Comments
The code has no dependencies. The build system is pretty straight forward to install, but is not required to build the code, this CMake snippet would be sufficient to build the code for internal use of another project: cmake_minimum_required(VERSION 2.8.3)
project(my_project)
include_directories(include)
set(serial_SRCS src/serial.cc include/serial/serial.h include/serial/v8stdint.h)
if(UNIX)
list(APPEND serial_SRCS src/impl/unix.cc)
else()
list(APPEND serial_SRCS src/impl/win.cc)
endif()
## Add serial library
add_library(serial ${serial_SRCS})
if(UNIX AND NOT APPLE)
target_link_libraries(serial rt)
endif()
## Build your executable
add_executable(my_program src/my_program.cpp)
## Link your executable against the library
target_link_libraries(my_program serial) If you know it will be Linux or OS X, then you can drop the https://github.com/wjwwood/serial/tree/master/visual_studio If that answers your question, please close the issue. |
Ok, I added the code to my existing project and look and behold it compiled. You listed a lot of dependencies on the main page, turns out they are only build dependencies. Thanks :) |
Can this library have less dependencies?
I would love a cross-platform library thats just a bunch of c or c++ code that I can dump into my existing code and then have serial communication - just like that.
This library I wont even try because of all the dependencies - seems like a hazzle to ask users to install all that.
The text was updated successfully, but these errors were encountered: