]> git.zarvox.org Git - libtouchmouse.git/commitdiff
Fix build on OSX.
authorDrew Fisher <drew.m.fisher@gmail.com>
Sun, 30 Oct 2011 22:42:05 +0000 (15:42 -0700)
committerDrew Fisher <drew.m.fisher@gmail.com>
Sun, 30 Oct 2011 22:42:05 +0000 (15:42 -0700)
Add LDFLAGS for the shared library via CMAKE_SHARED_LINKER_FLAGS.
Also actually link against the library we build.

Signed-off-by: Drew Fisher <drew.m.fisher@gmail.com>
CMakeLists.txt

index 28df86daac16a6e2a926c01f36a4b23530d90468..51853b4cfaeeefea16fd15d2cb144e66b668a701 100644 (file)
@@ -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()