Remove underlinking of libclsmoke and add a darwin case to the library definitons.
Wed Feb 17 18:05:35 CET 2010 Tobias Rautenkranz <tobias@rautenkranz.ch>
* Remove underlinking of libclsmoke and add a darwin case to the library definitons.
Thanks to Elliott Slaughter
diff -rN -u old-smoke/src/libsmoke/CMakeLists.txt new-smoke/src/libsmoke/CMakeLists.txt
--- old-smoke/src/libsmoke/CMakeLists.txt 2014-10-14 23:13:41.000000000 +0200
+++ new-smoke/src/libsmoke/CMakeLists.txt 2014-10-14 23:13:41.000000000 +0200
@@ -8,8 +8,23 @@
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden -fvisibility-inlines-hidden")
endif(CXX_VISIBILITY)
+
+# FIXME look for smoke.h
+find_library(smokeqtcore_LIB smokeqtcore)
+if (smokeqtcore_LIB)
+ set(smokeqtcore_FOUND TRUE)
+endif (smokeqtcore_LIB)
+
+if (smokeqtcore_FOUND)
+ message(STATUS "Found smokeqtcore: ${smokeqtcore}")
+else (smokeqtcore_FOUND)
+ message(FATAL_ERROR "Could not find smokeqtcore")
+endif (smokeqtcore_FOUND)
+
+
set(SMOKE_C_SOURCES smoke.cpp smokebinding.cpp)
add_library(clsmoke SHARED ${SMOKE_C_SOURCES})
+target_link_libraries(clsmoke ${QT_LIBRARIES} ${smokeqtcore_LIB})
set_target_properties(clsmoke
PROPERTIES
SOVERSION "0.0"
@@ -21,5 +36,4 @@
SOVERSION "0.0"
VERSION "0.0.1")
-install(TARGETS clsmoke clsmokeutil
- LIBRARY DESTINATION lib)
+install(TARGETS clsmoke clsmokeutil DESTINATION lib)
diff -rN -u old-smoke/src/libsmoke/smoke.lisp new-smoke/src/libsmoke/smoke.lisp
--- old-smoke/src/libsmoke/smoke.lisp 2014-10-14 23:13:41.000000000 +0200
+++ new-smoke/src/libsmoke/smoke.lisp 2014-10-14 23:13:41.000000000 +0200
@@ -1,20 +1,16 @@
(in-package #:smoke)
-;; Load the qt smoke binding to prevent undefined aliens.
(eval-when (:load-toplevel :compile-toplevel :execute)
- (define-foreign-library libsmokeqtcore
- (:unix "libsmokeqtcore.so.3")
- (t (:default "libsmokeqtcore")))
(define-foreign-library libclsmoke
+ (:darwin "libclsmoke.dylib")
(:unix "libclsmoke.so")
(t (:default "libclsmoke")))
(define-foreign-library libclsmokeutil
+ (:darwin "libclsmokeutil.dylib")
(:unix "libclsmokeutil.so")
(t (:default "libclsmokeutil")))
- (use-foreign-library libsmokeqtcore)
(use-foreign-library libclsmoke))
-
(eval-when (:load-toplevel :compile-toplevel :execute)
(use-foreign-library libclsmokeutil)
(defcfun (smoke-sizeof-bool "cl_smoke_sizeof_bool") :int)
diff -rN -u old-smoke/src/smoke.lisp new-smoke/src/smoke.lisp
--- old-smoke/src/smoke.lisp 2014-10-14 23:13:41.000000000 +0200
+++ new-smoke/src/smoke.lisp 2014-10-14 23:13:41.000000000 +0200
@@ -172,6 +172,7 @@
`(progn
(eval-when (:compile-toplevel :load-toplevel :execute)
(define-foreign-library ,library
+ (:darwin ,(format nil "~(~A~).3.dylib" library))
(:unix ,(format nil "~(~A~).so.3" library))
(t (:default ,(format nil "~(~A~)" library)))))
(eval-startup (:compile-toplevel :execute)