Skip to content

Instantly share code, notes, and snippets.

@eblot
Created June 10, 2010 22:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eblot/701ce5c2ca90bd3ecae7 to your computer and use it in GitHub Desktop.
Save eblot/701ce5c2ca90bd3ecae7 to your computer and use it in GitHub Desktop.
From 1ede36a9ab590a3225a503af5302fcc085669822 Mon Sep 17 00:00:00 2001
From: Emmanuel Blot <eblot@moaningmarmot.info>
Date: Fri, 11 Jun 2010 00:38:29 +0200
Subject: [PATCH] Fix up build on Mac OS X
---
CMakeLists.txt | 22 ++++++++++++++++------
1 files changed, 16 insertions(+), 6 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d082932..b76c4de 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -26,6 +26,11 @@ endif(${CMAKE_BUILD_TYPE} STREQUAL Debug)
FIND_PACKAGE(USB1 REQUIRED)
INCLUDE_DIRECTORIES(${LIBUSB_INCLUDE_DIR})
+find_package(Boost)
+if(Boost_FOUND)
+ include_directories(${Boost_INCLUDE_DIRS})
+endif(Boost_FOUND)
+
# Set components
set(CPACK_COMPONENTS_ALL sharedlibs staticlibs headers)
set(CPACK_COMPONENT_SHAREDLIBS_DISPLAY_NAME "Shared libraries")
@@ -43,14 +48,19 @@ set(CPACK_COMPONENT_SHAREDLIBS_GROUP "Development")
set(CPACK_COMPONENT_STATICLIBS_GROUP "Development")
set(CPACK_COMPONENT_HEADERS_GROUP "Development")
-# Create suffix to eventually install in lib64
-IF(CMAKE_SIZEOF_VOID_P EQUAL 4)
+if(NOT APPLE)
+ # Create suffix to eventually install in lib64
+ if(CMAKE_SIZEOF_VOID_P EQUAL 4)
+ SET(LIB_SUFFIX "")
+ SET(PACK_ARCH "")
+ else(CMAKE_SIZEOF_VOID_P EQUAL 8)
+ SET(LIB_SUFFIX 64)
+ SET(PACK_ARCH .x86_64)
+ endif(CMAKE_SIZEOF_VOID_P EQUAL 4)
+else(NOT APPLE)
SET(LIB_SUFFIX "")
SET(PACK_ARCH "")
- ELSE(CMAKE_SIZEOF_VOID_P EQUAL 8)
- SET(LIB_SUFFIX 64)
- SET(PACK_ARCH .x86_64)
-endif(CMAKE_SIZEOF_VOID_P EQUAL 4)
+endif(NOT APPLE)
# Package information
set(CPACK_PACKAGE_VERSION ${VERSION_STRING})
--
1.7.0.2+GitX
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment