Closed kybr closed 5 years ago
Hi Karl,
can you try changing the lines in allolib/cmake/single_file/CMakeLists.txt?
FROM: line 136 target_link_libraries(${app_name} ${app_link_libs}) line 140 target_link_libraries(${app_name} ${app_linker_flags})
TO: line 136 target_link_libraries(${app_name} PRIVATE ${app_link_libs}) line 140 target_link_libraries(${app_name} PRIVATE ${app_linker_flags})
Best, Kee.
On Tue, May 21, 2019 at 8:37 AM karl yerkes notifications@github.com wrote:
trying to use the user_flags example, we add a library to link. we add the tcc line below:
other libraries to link
set(app_link_libs tcc )
(i don't know if this is the correct way to this. the example does provide an example of how to use this functionality.)
this results in the following cmake error:
...
cmake -G 'Unix Makefiles' -Wno-deprecated -DBUILD_EXAMPLES=0 -DCMAKE_BUILD_TYPE=Release -DAL_APP_FILE=../../../main.cpp -DAL_VERBOSE_OUTPUT=ON -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DAL_APP_RUN=1 -DUSE_MPI=0 /Users/xx/yyyyy/AlloLib/./cmake/single_file found flags.cmake binary dir: /Users/xx/yyyyy/AlloLib/examples/user_flags/build/main/Release file full path: /Users/xx/yyyyy/AlloLib/examples/user_flags/main.cpp app path: /Users/xx/yyyyy/AlloLib/examples/user_flags app name: main al path: /Users/xx/yyyyy/AlloLib/cmake/single_file/../../../allolib -- Cuttlebone not found. Not building Cuttlebone. binary dir: /Users/xx/yyyyy/AlloLib/examples/user_flags/build/main/Release file full path: /Users/xx/yyyyy/AlloLib/examples/user_flags/main.cpp app path: /Users/xx/yyyyy/AlloLib/examples/user_flags app name: main al path: /Users/xx/yyyyy/AlloLib/cmake/single_file/../../../allolib include dirs: extra link libs: tcc definitions: -DUSE_COLOR compile flags: -Wno-unused-variable linker flags: -- Cuttlebone not found. Not building Cuttlebone. /usr/local/lib/libfreetype.dylib --------------- found freeimage found freetype Using RtMidi Using RtAudio Processing extensions libs: al_assets3d;/usr/local/lib/libassimp.dylib OpenVR not found. Not building al_openvr extension. libs: al_soundfile;/usr/local/lib/libsndfile.dylib DONE Processing extensions
CMake Error at CMakeLists.txt:136 (target_link_libraries): The keyword signature for target_link_libraries has already been used with the target "main". All uses of target_link_libraries with a target must be either all-keyword or all-plain.
The uses of the keyword signature are here:
- CMakeLists.txt:123 (target_link_libraries)
set +x
cmake --build . --target main_run --config Release -- -j3 /usr/local/Cellar/cmake/3.14.4/bin/cmake -S/Users/xx/yyyyy/AlloLib/cmake/single_file -B/Users/xx/yyyyy/AlloLib/examples/user_flags/build/main/Release --check-build-system CMakeFiles/Makefile.cmake 0 Re-run cmake file: Makefile older than: /Users/xx/yyyyy/AlloLib/examples/user_flags/flags.cmake found flags.cmake binary dir: /Users/xx/yyyyy/AlloLib/examples/user_flags/build/main/Release file full path: /Users/xx/yyyyy/AlloLib/examples/user_flags/main.cpp app path: /Users/xx/yyyyy/AlloLib/examples/user_flags app name: main al path: /Users/xx/yyyyy/AlloLib/cmake/single_file/../../../allolib -- Cuttlebone not found. Not building Cuttlebone. binary dir: /Users/xx/yyyyy/AlloLib/examples/user_flags/build/main/Release file full path: /Users/xx/yyyyy/AlloLib/examples/user_flags/main.cpp app path: /Users/xx/yyyyy/AlloLib/examples/user_flags app name: main al path: /Users/xx/yyyyy/AlloLib/cmake/single_file/../../../allolib include dirs: extra link libs: tcc definitions: -DUSE_COLOR compile flags: -Wno-unused-variable linker flags: -- Cuttlebone not found. Not building Cuttlebone. /usr/local/lib/libfreetype.dylib --------------- found freeimage found freetype -- ==== Configuring Gamma. -- Checking for module 'libsndfile' -- No package 'libsndfile' found -- Found SNDFILE -- libsndfile: /usr/local/lib/libsndfile.dylib -- threading: -- Could NOT find Vulkan (missing: VULKAN_LIBRARY VULKAN_INCLUDE_DIR) -- Using Cocoa for window creation Using RtMidi Using RtAudio Processing extensions libs: al_assets3d;/usr/local/lib/libassimp.dylib OpenVR not found. Not building al_openvr extension. -- Using libsndfile: /usr/local/lib/libsndfile.dylib libs: al_soundfile;/usr/local/lib/libsndfile.dylib -- Using fftw3: /usr/local/lib/libfftw3f.dylib DONE Processing extensions
CMake Error at CMakeLists.txt:136 (target_link_libraries): The keyword signature for target_link_libraries has already been used with the target "main". All uses of target_link_libraries with a target must be either all-keyword or all-plain.
The uses of the keyword signature are here:
- CMakeLists.txt:123 (target_link_libraries)
-- Configuring incomplete, errors occurred! See also "/Users/xx/yyyyy/AlloLib/examples/user_flags/build/main/Release/CMakeFiles/CMakeOutput.log". make: *** [cmake_check_build_system] Error 1
- set +x ...
linking to external libraries is hugely important. i cannot use AlloLib for my project until this issue is resolved.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
Fixed 3e13d029342d7499f0a6c2a4f3dafba5dcda2fc2
trying to use the user_flags example, we add a library to link. we add the tcc line below:
(i don't know if this is the correct way to this. the example does provide an example of how to use this functionality.)
this results in the following cmake error:
linking to external libraries is hugely important. i cannot use AlloLib for my project until this issue is resolved.