
cmake_minimum_required (VERSION 2.6)
project (tolua++)

include_directories ("${PROJECT_SOURCE_DIR}/../../src/")
include_directories ("${PROJECT_SOURCE_DIR}/include/")
include_directories ("${PROJECT_SOURCE_DIR}/../")

file(GLOB LIB_SOURCE
    "src/lib/*.c"
)

file(GLOB BIN_SOURCE
    "src/bin/*.c"
)

add_executable(tolua ${BIN_SOURCE})
add_library(tolualib ${LIB_SOURCE})

#m is the standard math librarys
if(UNIX)
add_library(math STATIC IMPORTED)
target_link_libraries(tolua math)
endif()

target_link_libraries(tolua lua tolualib)


cmake_minimum_required (VERSION 2.6)
project (tolua++)

include_directories ("${PROJECT_SOURCE_DIR}/../../src/")
include_directories ("${PROJECT_SOURCE_DIR}/include/")
include_directories ("${PROJECT_SOURCE_DIR}/../")

file(GLOB LIB_SOURCE
    "src/lib/*.c"
)

file(GLOB BIN_SOURCE
    "src/bin/*.c"
)

add_executable(tolua ${BIN_SOURCE})
add_library(tolualib ${LIB_SOURCE})

#m is the standard math librarys
if(UNIX)
find_library(M_LIB m)
target_link_libraries(${M_LIB})
endif()

target_link_libraries(tolua lua tolualib)

Revert "fixed bad reference to math library"
Revert "fixed bad reference to math library"

This reverts commit c2167d7ed73c96c7e8cb935074ba860e11c821f9.
