mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-27 11:39:02 +08:00
81 lines
2.5 KiB
Diff
81 lines
2.5 KiB
Diff
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
index 0418d4a..ac8f0f2 100644
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -2,6 +2,8 @@
|
|
cmake_minimum_required(VERSION 2.8.7)
|
|
project(jsonnet C CXX)
|
|
|
|
+add_definitions(-D_CRT_SECURE_NO_WARNINGS)
|
|
+
|
|
include(ExternalProject)
|
|
include(GNUInstallDirs)
|
|
|
|
@@ -89,6 +91,7 @@ else()
|
|
endif()
|
|
|
|
# Compiler flags.
|
|
+if (0)
|
|
if (${CMAKE_CXX_COMPILER_ID} MATCHES "Clang" OR
|
|
${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
|
|
set(OPT "-O3")
|
|
@@ -98,6 +101,7 @@ else()
|
|
# TODO: Windows support.
|
|
message(FATAL_ERROR "Compiler ${CMAKE_CXX_COMPILER_ID} not supported")
|
|
endif()
|
|
+endif()
|
|
|
|
# Look for libraries in global output path.
|
|
link_directories(${GLOBAL_OUTPUT_PATH})
|
|
diff --git a/cmd/CMakeLists.txt b/cmd/CMakeLists.txt
|
|
index c032f02..d80d2a0 100644
|
|
--- a/cmd/CMakeLists.txt
|
|
+++ b/cmd/CMakeLists.txt
|
|
@@ -13,5 +13,5 @@ if (BUILD_JSONNETFMT OR BUILD_TESTS)
|
|
add_dependencies(jsonnetfmt libjsonnet_for_binaries)
|
|
target_link_libraries(jsonnetfmt libjsonnet_for_binaries)
|
|
|
|
- install(TARGETS jsonnetfmt DESTINATION "${CMAKE_INSTALL_BINDIR}")
|
|
+ install(TARGETS jsonnetfmt DESTINATION tools/jsonnet)
|
|
endif()
|
|
diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt
|
|
index 60fdcb1..82fb7c2 100644
|
|
--- a/core/CMakeLists.txt
|
|
+++ b/core/CMakeLists.txt
|
|
@@ -28,7 +28,7 @@ set(LIBJSONNET_SOURCE
|
|
string_utils.cpp
|
|
vm.cpp)
|
|
|
|
-add_library(libjsonnet SHARED ${LIBJSONNET_HEADERS} ${LIBJSONNET_SOURCE})
|
|
+add_library(libjsonnet ${LIBJSONNET_HEADERS} ${LIBJSONNET_SOURCE})
|
|
add_dependencies(libjsonnet md5 stdlib)
|
|
target_link_libraries(libjsonnet md5 nlohmann_json::nlohmann_json)
|
|
|
|
@@ -46,7 +46,7 @@ set_target_properties(libjsonnet PROPERTIES OUTPUT_NAME jsonnet
|
|
PUBLIC_HEADER "${LIB_HEADER}")
|
|
install(TARGETS libjsonnet
|
|
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
|
- ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
|
+ ARCHIVE DESTINATION "${CMAKE_INSTALL_BINDIR}"
|
|
PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
|
|
|
|
if (BUILD_STATIC_LIBS)
|
|
diff --git a/stdlib/CMakeLists.txt b/stdlib/CMakeLists.txt
|
|
index a481d9f..0dc3ab6 100644
|
|
--- a/stdlib/CMakeLists.txt
|
|
+++ b/stdlib/CMakeLists.txt
|
|
@@ -2,6 +2,7 @@
|
|
|
|
add_executable(to_c_array to_c_array.cpp)
|
|
|
|
+if (0)
|
|
# Custom command that will only build stdlib when it changes.
|
|
add_custom_command(
|
|
OUTPUT ${PROJECT_SOURCE_DIR}/core/std.jsonnet.h
|
|
@@ -13,3 +14,4 @@ add_custom_command(
|
|
# Standard library build target that libjsonnet can depend on.
|
|
add_custom_target(stdlib ALL
|
|
DEPENDS ${PROJECT_SOURCE_DIR}/core/std.jsonnet.h)
|
|
+endif()
|
|
\ No newline at end of file
|