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 if (NOT WIN32)
     23     set (CMAKE_CXX_FLAGS "-std=c++11")
     24 endif()
     25 include_directories(
     26 	${CMAKE_CURRENT_SOURCE_DIR}
     27 	${CMAKE_CURRENT_SOURCE_DIR}/../../loader
     28 	${CMAKE_CURRENT_SOURCE_DIR}/../../include/vulkan
     29 	)
     30 
     31 add_library(vkjson STATIC vkjson.cc vkjson_instance.cc ../../loader/cJSON.c)
     32 
     33 if(UNIX)
     34     add_executable(vkjson_unittest vkjson_unittest.cc)
     35     add_executable(vkjson_info vkjson_info.cc)
     36 else()
     37     set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_CRT_SECURE_NO_WARNINGS")
     38     add_executable(vkjson_unittest vkjson_unittest.cc)
     39     add_executable(vkjson_info vkjson_info.cc)
     40 endif()
     41 
     42 target_link_libraries(vkjson_unittest vkjson)
     43 
     44 if(WIN32)
     45     target_link_libraries(vkjson_info vkjson vulkan-${MAJOR})
     46 elseif(UNIX)
     47     target_link_libraries(vkjson_info vkjson vulkan)
     48 else()
     49 endif()
     50