ofxCMake icon indicating copy to clipboard operation
ofxCMake copied to clipboard

ofMesh source file camke error

Open cansik opened this issue 6 years ago • 3 comments

When I create a new project with the project generator (without plugins) and add the CMakeLists.txt and then open it in clion, there is already an error because of the ofMesh library:

"/Users/cansik/Library/Application Support/JetBrains/Toolbox/apps/CLion/ch-0/181.5281.33/CLion.app/Contents/bin/cmake/bin/cmake" -DCMAKE_BUILD_TYPE=Debug -G "CodeBlocks - Unix Makefiles" /Users/cansik/git/temp/ColorExperiments
-- The C compiler identification is AppleClang 7.3.0.7030029
-- The CXX compiler identification is AppleClang 7.3.0.7030029
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
CMake Error at /Users/cansik/git/libs/openFrameworks/addons/ofxCMake/modules/config.cmake:13 (add_library):
  Cannot find source file:

    /Users/cansik/git/libs/openFrameworks/libs/openFrameworks/3d/ofMesh.cpp

  Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp
  .hxx .in .txx
Call Stack (most recent call first):
  /Users/cansik/git/libs/openFrameworks/addons/ofxCMake/modules/main.cmake:45 (include)
  CMakeLists.txt:44 (include)


CMake Error: CMake can not determine linker language for target: of_shared
CMake Error: Cannot determine link language for target "of_shared".
CMake Error: Cannot determine link language for target "of_static".
CMake Error: CMake can not determine linker language for target: of_static
-- Generating done
-- Build files have been written to: /Users/cansik/git/temp/ColorExperiments/cmake-build-debug
Unable to determine product file path for target of_shared. Running and debugging will be unavailable.
Unable to determine product file path for target of_static. Running and debugging will be unavailable.

[Failed to reload]

cansik avatar Jun 25 '18 09:06 cansik

It seems that of has now inlined some files, so your list is not actual anymore. Maybe it makes sense to generate the openFrameworks.cmake by a script for each version.

cansik avatar Jun 25 '18 10:06 cansik

Did you find a fix for this @cansik ?

austince avatar Aug 19 '18 15:08 austince

Perhaps something like this would work:

file(GLOB OF_SOURCE_FILES "${OF_DIRECTORY_ABSOLUTE}/libs/openFrameworks/**/*.cpp")

austince avatar Aug 19 '18 15:08 austince