I'm trying to build a small FLTK-using app with cmake under macOS. Following README.CMake.txt, section 3, I prepared this CMakeLists.txt:
cmake_minimum_required(VERSION 2.6.3) project(small) set(FLTK_DIR /Volumes/Extra) # the BUILD dir of FLTK find_package(FLTK REQUIRED NO_MODULE) add_executable(small MACOSX_BUNDLE small.cxx) target_include_directories(small PUBLIC ${FLTK_INCLUDE_DIRS}) target_link_libraries(small fltk)
With it, the build fails at link step (compilation step is good) in that all macOS-defined symbols are missing. If I replace the last line of CMakeLists.txt by
target_link_libraries(small fltk "-framework Cocoa")
the build succeeds, and a functional macOS bundle is produced.
I had expected cmake to be smart enough to know from
find_package(FLTK REQUIRED NO_MODULE) that "-framework Cocoa" was necessary in link commands. Is that incorrect?
--
You received this message because you are subscribed to the Google Groups "fltk.coredev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkcoredev+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkcoredev/0aa65f43-082d-41dc-8574-d56584eef413n%40googlegroups.com.
[ Direct Link to Message ] |