From: Drew Fisher Date: Sun, 30 Oct 2011 22:42:05 +0000 (-0700) Subject: Fix build on OSX. X-Git-Url: https://git.zarvox.org/?a=commitdiff_plain;h=58feb19b4994023502a75f63b562a908b45bcfec;p=libtouchmouse.git Fix build on OSX. Add LDFLAGS for the shared library via CMAKE_SHARED_LINKER_FLAGS. Also actually link against the library we build. Signed-off-by: Drew Fisher --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 28df86d..51853b4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,6 +20,7 @@ elseif(APPLE) # Apple-specific options go here. message(STATUS "Detected Apple system") list(APPEND LIBSRC hidapi/mac/hid.c) + set(CMAKE_SHARED_LINKER_FLAGS "-framework IOKit -framework CoreFoundation") set(CMAKE_EXE_LINKER_FLAGS "-framework IOKit -framework CoreFoundation") else() # Linux-specific options go here. @@ -41,4 +42,6 @@ if(WIN32) target_link_libraries(consoledemo touchmouse setupapi) elseif(NOT APPLE) target_link_libraries(consoledemo touchmouse usb-1.0 pthread rt) +else() + target_link_libraries(consoledemo touchmouse) endif()