From 43807b196d868da3a6154b869c77340c04d9a8c3 Mon Sep 17 00:00:00 2001 From: Jeffrey Pfau Date: Thu, 30 Jan 2014 23:58:48 -0800 Subject: [PATCH] Move SDL/OpenGL dependencies into the SDL port --- CMakeLists.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3ceaafea7..183bfdca5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,7 +19,7 @@ if(WIN32) file(GLOB OS_SRC ${CMAKE_SOURCE_DIR}/src/platform/windows/*.c) else() add_definitions(-DUSE_PTHREADS) - set(PLATFORM_LIBRARY "${PLATFORM_LIBRARY};pthread") + set(OS_LIBRARY "${OS_LIBRARY};pthread") file(GLOB OS_SRC ${CMAKE_SOURCE_DIR}/src/platform/posix/*.c) endif() @@ -57,13 +57,13 @@ endif() if(BUILD_PERF) set(MAIN_SRC ${CMAKE_SOURCE_DIR}/src/platform/perf-main.c) if(UNIX AND NOT APPLE) - set(EXTRA_LIB ${EXTRA_LIB} rt) + set(PLATFORM_LIB "${PLATFORM_LIB};rt") endif() endif() -add_library(${BINARY_NAME} SHARED ${ARM_SRC} ${GBA_SRC} ${DEBUGGER_SRC} ${RENDERER_SRC} ${UTIL_SRC} ${PLATFORM_SRC} ${OS_SRC}) -target_link_libraries(${BINARY_NAME} m ${DEBUGGER_LIB} ${PLATFORM_LIBRARY} ${OPENGL_LIBRARY} ${EXTRA_LIB}) +add_library(${BINARY_NAME} SHARED ${ARM_SRC} ${GBA_SRC} ${DEBUGGER_SRC} ${RENDERER_SRC} ${UTIL_SRC} ${OS_SRC}) +target_link_libraries(${BINARY_NAME} m ${DEBUGGER_LIB} ${OS_LIB}) -add_executable(${BINARY_NAME}-bin WIN32 ${MAIN_SRC}) -target_link_libraries(${BINARY_NAME}-bin ${BINARY_NAME}) +add_executable(${BINARY_NAME}-bin WIN32 ${PLATFORM_SRC} ${MAIN_SRC}) +target_link_libraries(${BINARY_NAME}-bin ${BINARY_NAME} ${PLATFORM_LIBRARY} ${OPENGL_LIBRARY}) set_target_properties(${BINARY_NAME}-bin PROPERTIES OUTPUT_NAME ${BINARY_NAME})