Skip to content
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

How to build? #3

Open
kkstun opened this issue Nov 21, 2024 · 5 comments
Open

How to build? #3

kkstun opened this issue Nov 21, 2024 · 5 comments

Comments

@kkstun
Copy link

kkstun commented Nov 21, 2024

CMake Error at CMakeLists.txt:17 (target_link_libraries):
Cannot specify link libraries for target "BLEScout" which is not built by
this project.

@eriklins
Copy link
Owner

Have you modified the CmakeLists.txt? Mine is just 10 lines, so not sure about line 17.

I confess, I need to add some build instructions. Will do that along with the upcoming new release, which will fix some issues and should be available on all three platforms then.

You need to create a folder lib in the blescout root and inside that folder you have to clone the nappgui_src repo and SimpleBLE repo. I'm going to add those as recursive git submodules with the next release.

image

Then build NAppGUI:

// Windows
mkdir build & cd build
cmake .. -DCMAKE_INSTALL_PREFIX=C:/nappgui
cmake --build . --config Debug

// macOS
mkdir build ; cd build
cmake .. -G Xcode -DCMAKE_INSTALL_PREFIX=/usr/local/nappgui
cmake --build . --config Debug

// Linux
mkdir build ; cd build
cmake .. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=/usr/local/nappgui
cmake --build .

And finally build blescout:

cmake --build build --config Release

@kkstun
Copy link
Author

kkstun commented Nov 21, 2024

let me see.
`cmake_minimum_required(VERSION 3.5)
project(BLE-Scout)

find_package(nappgui REQUIRED)

SET(NAPPGUI_ROOT_PATH,"E:/works_napp/nappgui")

include("${NAPPGUI_ROOT_PATH}/prj/NAppCompilers.cmake")
nap_config_compiler()

Remove WIN32 in Linux and macOS

add_executable(BLEScout WIN32 blescout.c util.c logwin.c ble.c connect.c help.c)
target_link_libraries(BLEScout ${NAPPGUI_LIBRARIES})

simpleble

add_subdirectory(simpleble/simpleble ${CMAKE_BINARY_DIR}/simpleble)
target_link_libraries(BLEScout simpleble::simpleble-c)`

I am new Programmer.

@eriklins
Copy link
Owner

Okay, that's a bit different to what I used recently. I need a moment to update all this and add build information into the repo, my bad.

As a new programmer, the NAppGUI documentation is a great source of advice not just in particular for NAppGUI but also in general. Great reading from the author.

@kkstun
Copy link
Author

kkstun commented Nov 21, 2024

OK,thanks. I wait your new build .

@kkstun kkstun closed this as not planned Won't fix, can't repro, duplicate, stale Nov 21, 2024
@eriklins
Copy link
Owner

I would leave that issue open and close when build information have been added.

@eriklins eriklins reopened this Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants