Skip to content

fix building with a custom sysroot directory#3

Open
KanjiMonster wants to merge 3 commits into
openwrt:masterfrom
KanjiMonster:jogo_local_build_fixes
Open

fix building with a custom sysroot directory#3
KanjiMonster wants to merge 3 commits into
openwrt:masterfrom
KanjiMonster:jogo_local_build_fixes

Conversation

@KanjiMonster
Copy link
Copy Markdown
Member

Fix building with a non-default sysroot directory:

  1. adhere to CMAKE_INSTALL_PREFIX instead of forcing it to /
  2. search for OpenWrt libraries instead of assuming these are installed as system libraries
  3. search for uci.h instead of assuming it is present in the system include directories

Using these changes, I can just let uci etc install into a local directory, and then tell ustp to look for libraries in that local directory by just setting the install prefix to that directory.

Note that 1. will break the OpenWrt package build and requires updating the package recipe. OpenWrt passes /usr as install prefix, so ustp will now install itself correctly to /usr/sbin instead of /sbin, but the package recipe looks in /sbin. Easy fix, but still.

When locally building, one might want to install to a different
directory, or look for dependencies from a different path.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
Do not assume ubox and ubus are system libraries, but actually look for
them e.g. in install prefix as well.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
Like with ubox and ubus libraries, search for uci.h and use the result.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
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

Successfully merging this pull request may close these issues.

1 participant