1# Copyright 2015 Google Inc. All rights reserved. 2# 3# Permission is hereby granted, free of charge, to any person obtaining a 4# copy of this software and/or associated documentation files (the 5# "Materials"), to deal in the Materials without restriction, including 6# without limitation the rights to use, copy, modify, merge, publish, 7# distribute, sublicense, and/or sell copies of the Materials, and to 8# permit persons to whom the Materials are furnished to do so, subject to 9# the following conditions: 10# 11# The above copyright notice and this permission notice shall be included 12# in all copies or substantial portions of the Materials. 13# 14# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20# THE SOFTWARE. 21 22include_directories( 23 ${CMAKE_CURRENT_SOURCE_DIR} 24 ${CMAKE_CURRENT_SOURCE_DIR}/../../loader 25 ${CMAKE_CURRENT_SOURCE_DIR}/../../include/vulkan 26 ) 27 28add_library(vkjson STATIC vkjson.cc vkjson_instance.cc ../../loader/cJSON.c) 29 30if(UNIX) 31 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-sign-compare") 32 add_executable(vkjson_unittest vkjson_unittest.cc) 33 add_executable(vkjson_info vkjson_info.cc) 34else() 35 set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_CRT_SECURE_NO_WARNINGS") 36 add_executable(vkjson_unittest vkjson_unittest.cc) 37 add_executable(vkjson_info vkjson_info.cc) 38endif() 39 40target_link_libraries(vkjson_unittest vkjson) 41 42if(WIN32) 43 target_link_libraries(vkjson_info vkjson vulkan-${MAJOR}) 44elseif(UNIX) 45 target_link_libraries(vkjson_info vkjson vulkan) 46else() 47endif() 48