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

[BUG] CMake find_path doesn't find headers #907

Closed
DanAlbert opened this issue Feb 8, 2019 · 1 comment
Closed

[BUG] CMake find_path doesn't find headers #907

DanAlbert opened this issue Feb 8, 2019 · 1 comment
Assignees
Milestone

Comments

@DanAlbert
Copy link
Member

Refiling internal bug for visibility: http://b/123290652. I already have a fix, just filing so we have something to refer to in the changelog.

CMake's find_path no longer works for finding NDK headers. This worked in r18. The sample below will abort.

cmake_minimum_required(VERSION 3.6.0)

find_path(EGL_INCLUDE_DIR NAMES EGL/egl.h)
if(NOT EGL_INCLUDE_DIR)
  message(FATAL_ERROR "EGL_INCLUDE_DIR = " ${EGL_INCLUDE_DIR})
endif()
@DanAlbert
Copy link
Member Author

Fix is merged.

grendello added a commit to grendello/xamarin-android that referenced this issue Mar 12, 2019
`cmake` 3.10 is the current version of the tool in the Android SDK,
an update from the much older 3.6. This update brings it closer to
the host `cmake` versions (currently mostly 3.12.*)

Bump NDK to release [19b][0] (a.k.a. 19.1), with the following changes:

    * [Issue 855][1]: ndk-build automatically disables multithreaded
      linking for LLD on Windows, where it may hang. It is not
      possible for the NDK to detect this situation for CMake,
      so CMake users and custom build systems must pass
      `-Wl,--no-threads` when linking with LLD on Windows.
    * [Issue 849][2]: Fixed unused command line argument warning when
      using standalone toolchains to compile C code.
    * [Issue 890][3]: Fixed CMAKE_FIND_ROOT_PATH. CMake projects will
      no longer search the host's sysroot for headers and libraries.
    * [Issue 907][4]: Fixed find_path for NDK headers in CMake.

[0]: https://github.com/android-ndk/ndk/wiki/Changelog-r19#r19b
[1]: android/ndk#855
[2]: android/ndk#849
[3]: android/ndk#890
[4]: android/ndk#907
grendello added a commit to grendello/xamarin-android that referenced this issue Mar 12, 2019
`cmake` 3.10 is the current version of the tool in the Android SDK,
an update from the much older 3.6. This update brings it closer to
the host `cmake` versions (currently mostly 3.12.*)

Bump NDK to release [19b][0] (a.k.a. 19.1), with the following changes:

  * [Issue 855][1]: ndk-build automatically disables multithreaded
    linking for LLD on Windows, where it may hang. It is not
    possible for the NDK to detect this situation for CMake,
    so CMake users and custom build systems must pass
    `-Wl,--no-threads` when linking with LLD on Windows.
  * [Issue 849][2]: Fixed unused command line argument warning when
    using standalone toolchains to compile C code.
  * [Issue 890][3]: Fixed CMAKE_FIND_ROOT_PATH. CMake projects will
    no longer search the host's sysroot for headers and libraries.
  * [Issue 907][4]: Fixed find_path for NDK headers in CMake.

[0]: https://github.com/android-ndk/ndk/wiki/Changelog-r19#r19b
[1]: android/ndk#855
[2]: android/ndk#849
[3]: android/ndk#890
[4]: android/ndk#907
jonpryor pushed a commit to dotnet/android that referenced this issue Mar 13, 2019
`cmake` 3.10 is the current version of the tool in the Android SDK,
an update from the much older 3.6.  This update brings it closer to
the host `cmake` versions (currently mostly 3.12.*)

Bump NDK to release [19b][0] (a.k.a. 19.1), which changes:

  * [Issue 855][1]: ndk-build automatically disables multithreaded
    linking for LLD on Windows, where it may hang.  It is not
    possible for the NDK to detect this situation for CMake,
    so CMake users and custom build systems must pass
    `-Wl,--no-threads` when linking with LLD on Windows.
  * [Issue 849][2]: Fixed unused command line argument warning when
    using standalone toolchains to compile C code.
  * [Issue 890][3]: Fixed CMAKE_FIND_ROOT_PATH.  CMake projects will
    no longer search the host's sysroot for headers and libraries.
  * [Issue 907][4]: Fixed find_path for NDK headers in CMake.

[0]: https://github.com/android-ndk/ndk/wiki/Changelog-r19#r19b
[1]: android/ndk#855
[2]: android/ndk#849
[3]: android/ndk#890
[4]: android/ndk#907
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant