Commit cd0b4935 authored by Tom Finegan's avatar Tom Finegan
Browse files

Handle debug, msvc, and static config flags properly.

- Turn CONFIG_DEBUG on for debug CMAKE_BUILD_TYPEs.
- Turn CONFIG_MSVS on for MSVC builds.
- Turn CONFIG_STATIC off for shared lib builds.

Change-Id: If3537a9263ef85aa6bf76f00e8e008e5c93c9a33
parent 4f948b31
......@@ -83,10 +83,15 @@ string(STRIP "${AOM_CMAKE_CONFIG}" AOM_CMAKE_CONFIG)
message("--- aom_configure: Detected CPU: ${AOM_TARGET_CPU}")
set(AOM_TARGET_SYSTEM ${CMAKE_SYSTEM_NAME})
if ("${CMAKE_BUILD_TYPE}" MATCHES "Deb")
set(CONFIG_DEBUG 1)
endif ()
if (NOT MSVC)
if (BUILD_SHARED_LIBS)
set(CONFIG_PIC 1)
set(CONFIG_SHARED 1)
set(CONFIG_STATIC 0)
endif ()
if (CONFIG_PIC)
......@@ -98,6 +103,8 @@ if (NOT MSVC)
set(AOM_AS_FLAGS ${AOM_AS_FLAGS} -DPIC)
endif ()
endif ()
else ()
set(CONFIG_MSVS 1)
endif ()
if (NOT "${AOM_SUPPORTED_CPU_TARGETS}" MATCHES "${AOM_TARGET_CPU}")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment