-
Notifications
You must be signed in to change notification settings - Fork 2
/
cfsqp_standalone.patch
60 lines (52 loc) · 1.89 KB
/
cfsqp_standalone.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
From e0e6451664794fbd58cd739920cd49151af20fa7 Mon Sep 17 00:00:00 2001
From: Christopher Dembia <[email protected]>
Date: Wed, 26 Mar 2014 19:45:07 -0700
Subject: [PATCH] Make CFSQP standalone.
---
CMakeLists.txt | 26 ++++++++++++++------------
1 file changed, 14 insertions(+), 12 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 03dbdbc..604a23c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,10 +1,11 @@
-SET(KIT CFSQP)
-SET(UKIT CFSQP)
+PROJECT(CFSQP)
+
+CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
##
## Version stuff
##
-SET(OPENSIM_CFSQP_LIBRARY_NAME osim${KIT})
+SET(OPENSIM_CFSQP_LIBRARY_NAME osimCFSQP)
SET(OPENSIM_CFSQP_MAJOR_VERSION 3)
SET(OPENSIM_CFSQP_MINOR_VERSION 0)
SET(OPENSIM_CFSQP_BUILD_VERSION 0)
@@ -24,18 +25,19 @@ ADD_DEFINITIONS(-DOPENSIM_CFSQP_LIBRARY_NAME=${OPENSIM_CFSQP_LIBRARY_NAME}
SET(SOURCE_FILES cfsqp.c qld.c osimCFSQPDLL.cpp About.cpp)
FILE(GLOB INCLUDE_FILES *.h)
-INCLUDE_DIRECTORIES(${OpenSim_SOURCE_DIR} ${OpenSim_SOURCE_DIR}/Vendors )
-
IF(WIN32)
-ADD_DEFINITIONS("-DOSIM${UKIT}_EXPORTS -D__STDC__")
+ ADD_DEFINITIONS("-DOSIMCFSQP_EXPORTS -D__STDC__")
ELSE(WIN32)
-#ADD_DEFINITIONS("-DOSIM${UKIT}_EXPORTS")
+ #ADD_DEFINITIONS("-DOSIMCFSQP_EXPORTS")
ENDIF(WIN32)
-ADD_LIBRARY(osim${KIT} SHARED ${SOURCE_FILES} ${INCLUDE_FILES})
+ADD_LIBRARY(osimCFSQP SHARED ${SOURCE_FILES} ${INCLUDE_FILES})
-SET_TARGET_PROPERTIES(osim${KIT} PROPERTIES PROJECT_LABEL "Vendor Libraries - osim${KIT}")
+SET_TARGET_PROPERTIES(osimCFSQP
+ PROPERTIES PROJECT_LABEL "Vendor Libraries - osimCFSQP")
-# Don't automatically include it in public release
-#INSTALL_TARGETS(/lib/ RUNTIME_DIRECTORY /lib osim${KIT})
-#INSTALL_FILES(/include/Vendors/${KIT} .h ${INCLUDE_FILES})
+INSTALL(TARGETS osimCFSQP
+ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION lib
+ ARCHIVE DESTINATION sdk/lib)
+INSTALL(FILES ${INCLUDE_FILES} DESTINATION include/Vendors/CFSQP)
--
1.8.3.2