Reorder libraries for win32
[mussa.git] / py / CMakeLists.txt
index 5750a5263644f1d21b2e03c356108cd01eb7d179..022ef5adb21f72c06e37c050749c002da391acc8 100644 (file)
@@ -25,9 +25,17 @@ IF(BOOST_PYTHON_LIBRARY)
   
   ADD_LIBRARY(mussa MODULE ${SOURCES})
   ADD_LIBRARY(mussa_py STATIC ${SOURCES})
-  ADD_CUSTOM_TARGET(mussa.so ALL
-                     COMMAND cp libmussa.so mussa.so
-                     DEPENDS mussa)
+  # Any suggestions for a more elegant solution to this? -diane
+  IF(WIN32)
+    ADD_CUSTOM_TARGET(mussa.dll ALL
+                      COMMAND copy libmussa.dll mussa.dll
+                      DEPENDS mussa)
+  ELSE(WIN32)
+    # Not win32, aka linux and mac
+    ADD_CUSTOM_TARGET(mussa.so ALL
+                      COMMAND cp libmussa.so mussa.so
+                      DEPENDS mussa)
+  ENDIF(WIN32)
   LINK_DIRECTORIES(${CMAKE_BINARY_DIR}/alg)
   TARGET_LINK_LIBRARIES(mussa 
                           mussa_core