TheFoundryVisionmongers / KatanaUsdPlugins

Katana USD Plugins Repo
Other
48 stars 20 forks source link

Project is missing from top level CMakeLists.txt #5

Closed sirpalee closed 3 years ago

sirpalee commented 4 years ago

When building the project on Linux, against the Katana shipped dependencies, there is a warning about a missing project() call:

CMake Warning (dev) in CMakeLists.txt:
  No project() command is present.  The top-level CMakeLists.txt file must
  contain a literal, direct call to the project() command.  Add a line of
  code such as

    project(ProjectName)

  near the top of the file, but after cmake_minimum_required().

  CMake is pretending there is a "project(Project)" command on the first
  line.

Is there a reason why this is missing? (i.e. this is built as a subproject in your internal build system) It can be trivially fixed by something like:

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5350a73..e142a1f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,4 +1,7 @@
 cmake_minimum_required(VERSION 3.12)
+
+project(KatanaUsdPlugins)
+
 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH}
                       ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules
                       ${CMAKE_CURRENT_SOURCE_DIR}/cmake/macros)
JamesPedFoundry commented 4 years ago

Hi Pal!

Yep this looks like a very simple one to fix and definitely an oversight on our behalf. We do indeed run it from inside another project when building it within Katana, but we should have ensured we resolved this warning when we tested running our external build scripts. I've ticketed this up internally for us to fix (#430255).

Cheers, James

sirpalee commented 3 years ago

Closing this, since 19.11_fn4 adds the project definition.