Permalink
Browse files

broken window theory

  • Loading branch information...
1 parent 7faa421 commit 9938d8f68e1c0e54397856ba536b03a713faa9ce @RJ committed Mar 16, 2009
@@ -59,14 +59,16 @@ TARGET_LINK_LIBRARIES(scanner
${Boost_THREAD_LIBRARY}
${TAGLIB_LIBRARIES})
-ADD_EXECUTABLE( playdar
+SET(LIBRARY_OUTPUT_PATH "${PLAYDAR_PATH}/bin")
+
+ADD_LIBRARY ( playdarengine SHARED
${SRC}/application.cpp
${SRC}/resolver.cpp
${SRC}/resolver_service.cpp
${SRC}/rs_local_library.cpp
${SRC}/library.cpp
${SRC}/playdar/playdar_request_handler.cpp
- ${SRC}/playdar/main.cpp
+# ${SRC}/playdar/main.cpp
# sqlite wrapper:
${DEPS}/sqlite3pp-read-only/sqlite3pp.cpp
@@ -89,7 +91,7 @@ ADD_EXECUTABLE( playdar
${DEPS}/pdl-0.3.0/src/LoaderException.cpp
)
-TARGET_LINK_LIBRARIES( playdar
+TARGET_LINK_LIBRARIES( playdarengine
${TAGLIB_LIBRARIES} # LGPL/MPL
${SQLITE3_LIBRARIES} # public domain
#${URIPARSER_LIBRARIES} # BSD
@@ -102,8 +104,16 @@ TARGET_LINK_LIBRARIES( playdar
${Boost_PROGRAM_OPTIONS_LIBRARY}
)
-INSTALL(TARGETS scanner RUNTIME DESTINATION bin)
-INSTALL(TARGETS playdar RUNTIME DESTINATION bin)
+ADD_EXECUTABLE( playdar
+ ${SRC}/playdar/main.cpp
+ )
+TARGET_LINK_LIBRARIES( playdar
+ playdarengine
+ )
+
+
+#INSTALL(TARGETS scanner RUNTIME DESTINATION bin)
+#INSTALL(TARGETS playdarengine LIBRARY DESTINATION bin)
#
# Resolver Plugins
@@ -29,7 +29,7 @@ class playdar_request_handler;
* and resolver
*
*/
-class MyApplication
+class PLAYDAR_DLLEXPORT MyApplication
{
public:
MyApplication(playdar::Config c);
@@ -18,7 +18,8 @@
#include "playdar/application.h"
#include "playdar/auth.hpp"
-class playdar_request_handler : public moost::http::request_handler_base<playdar_request_handler>
+
+class PLAYDAR_DLLEXPORT playdar_request_handler : public moost::http::request_handler_base<playdar_request_handler>
{
public:
void init(MyApplication * app);
@@ -7,13 +7,20 @@
#include <stdio.h>
#include <boost/shared_ptr.hpp>
#include <boost/function.hpp>
+
#ifdef HAS_OSSP_UUID_H
#include <ossp/uuid.h>
#else
// default source package for ossp-uuid doesn't namespace itself
#include <uuid.h>
#endif
+#if defined(_WIN32) || defined(WIN32)
+ #define PLAYDAR_DLLEXPORT __declspec(dllexport)
+#else
+ #define PLAYDAR_DLLEXPORT
+#endif
+
using namespace std;
typedef string query_uid; // identifies a resolverquery
@@ -9,14 +9,7 @@ ADD_LIBRARY( darknet SHARED
SET_TARGET_PROPERTIES( darknet PROPERTIES
PREFIX ""
SUFFIX ".resolver"
- CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PLAYDAR_DIR}/plugins"
)
-TARGET_LINK_LIBRARIES( darknet
- ${OSSPUUID_LIBRARIES} # BSD-like
- ${Boost_REGEX_LIBRARY} # Boost license
- ${Boost_SYSTEM_LIBRARY}
- ${Boost_FILESYSTEM_LIBRARY}
- ${Boost_THREAD_LIBRARY}
- )
+TARGET_LINK_LIBRARIES( darknet playdarengine )
@@ -10,8 +10,4 @@ SET_TARGET_PROPERTIES( demo PROPERTIES
PREFIX ""
SUFFIX ".resolver")
-TARGET_LINK_LIBRARIES( demo
- ${OSSPUUID_LIBRARIES}
- ${Boost_SYSTEM_LIBRARY}
- ${Boost_THREAD_LIBRARY}
- )
+TARGET_LINK_LIBRARIES( demo playdarengine )
@@ -12,10 +12,4 @@ SET_TARGET_PROPERTIES( gateway_script PROPERTIES
SUFFIX ".resolver")
-TARGET_LINK_LIBRARIES( gateway_script
- ${OSSPUUID_LIBRARIES} # BSD-like
- ${Boost_REGEX_LIBRARY} # Boost license
- ${Boost_SYSTEM_LIBRARY}
- ${Boost_FILESYSTEM_LIBRARY}
- ${Boost_THREAD_LIBRARY}
- )
+TARGET_LINK_LIBRARIES( gateway_script playdarengine )
@@ -10,8 +10,4 @@ SET_TARGET_PROPERTIES( lan_udp PROPERTIES
PREFIX ""
SUFFIX ".resolver")
-TARGET_LINK_LIBRARIES( lan_udp
- ${OSSPUUID_LIBRARIES} # BSD-like
- ${Boost_SYSTEM_LIBRARY}
- ${Boost_THREAD_LIBRARY}
- )
+TARGET_LINK_LIBRARIES( lan_udp playdarengine )

0 comments on commit 9938d8f

Please sign in to comment.