Home | History | Annotate | Download | only in vkjson
      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 
     22 include_directories(
     23 	${CMAKE_CURRENT_SOURCE_DIR}
     24 	${CMAKE_CURRENT_SOURCE_DIR}/../../loader
     25 	${CMAKE_CURRENT_SOURCE_DIR}/../../include/vulkan
     26 	${CMAKE_CURRENT_SOURCE_DIR}/../../libs/cjson/includes
     27 	)
     28 
     29 add_library(vkjson STATIC vkjson.cc vkjson_instance.cc ../../libs/cjson/cJSON.c)
     30 
     31 if(UNIX)
     32     set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-sign-compare")
     33     add_executable(vkjson_unittest vkjson_unittest.cc)
     34     add_executable(vkjson_info vkjson_info.cc)
     35 else()
     36     set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_CRT_SECURE_NO_WARNINGS")
     37     add_executable(vkjson_unittest vkjson_unittest.cc)
     38     add_executable(vkjson_info vkjson_info.cc)
     39 endif()
     40 
     41 target_link_libraries(vkjson_unittest vkjson)
     42 
     43 if(WIN32)
     44     target_link_libraries(vkjson_info vkjson ${API_LOWERCASE}-${MAJOR})
     45 elseif(UNIX)
     46     target_link_libraries(vkjson_info vkjson ${API_LOWERCASE})
     47 else()
     48 endif()
     49