aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/yajl/cmake.patch
blob: 56d5ac7724d0a84fc0ac3721a54d78d6c2a5eada (plain)
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
60
61
62
63
64
65
66
67
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4c0a9be..cbec22f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -28,7 +28,7 @@ ENDIF (NOT CMAKE_BUILD_TYPE)
 
 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
 
-IF (WIN32)
+IF (WIN32 AND FALSE)
   SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W4")
   ADD_DEFINITIONS(-DWIN32)
   SET(linkFlags "/PDB:NONE /INCREMENTAL:NO /OPT:NOREF /OPT:NOICF")
@@ -46,7 +46,8 @@ IF (WIN32)
   SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4996 /wd4255 /wd4130 /wd4100 /wd4711")
   SET(CMAKE_C_FLAGS_DEBUG "/D DEBUG /Od /Z7")
   SET(CMAKE_C_FLAGS_RELEASE "/D NDEBUG /O2")
-ELSE (WIN32)
+endif()
+if (NOT WIN32)
   SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
   IF(CMAKE_COMPILER_IS_GNUCC)
     INCLUDE(CheckCCompilerFlag)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 99cf9e9..454482a 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -78,7 +78,7 @@ INCLUDE_DIRECTORIES(${incDir}/..)
 # at build time you may specify the cmake variable LIB_SUFFIX to handle
 # 64-bit systems which use 'lib64'
 INSTALL(TARGETS yajl
-        RUNTIME DESTINATION lib${LIB_SUFFIX}
+        RUNTIME DESTINATION bin
         LIBRARY DESTINATION lib${LIB_SUFFIX}
         ARCHIVE DESTINATION lib${LIB_SUFFIX})
 INSTALL(TARGETS yajl_s ARCHIVE DESTINATION lib${LIB_SUFFIX})
diff --git a/verify/CMakeLists.txt b/verify/CMakeLists.txt
index 2f39008..967fca1 100644
--- a/verify/CMakeLists.txt
+++ b/verify/CMakeLists.txt
@@ -29,9 +29,7 @@ ADD_EXECUTABLE(json_verify ${SRCS})
 TARGET_LINK_LIBRARIES(json_verify yajl_s)
 
 # copy in the binary
-GET_TARGET_PROPERTY(binPath json_verify LOCATION)
-
 ADD_CUSTOM_COMMAND(TARGET json_verify POST_BUILD
-    COMMAND ${CMAKE_COMMAND} -E copy_if_different ${binPath} ${binDir})
+    COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_FILE:json_verify> ${binDir})
 
 INSTALL(TARGETS json_verify RUNTIME DESTINATION bin)
diff --git a/reformatter/CMakeLists.txt b/reformatter/CMakeLists.txt
index 52a9bee..267d02e 100644
--- a/reformatter/CMakeLists.txt
+++ b/reformatter/CMakeLists.txt
@@ -35,9 +35,7 @@ IF (NOT WIN32)
 ENDIF (NOT WIN32)
 
 # copy the binary into the output directory
-GET_TARGET_PROPERTY(binPath json_reformat LOCATION)
-
 ADD_CUSTOM_COMMAND(TARGET json_reformat POST_BUILD
-    COMMAND ${CMAKE_COMMAND} -E copy_if_different ${binPath} ${binDir})
+    COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_FILE:json_reformat> ${binDir})
 
 INSTALL(TARGETS json_reformat RUNTIME DESTINATION bin)