diff options
author | Chris Robinson <[email protected]> | 2017-12-15 12:25:50 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2017-12-15 12:25:50 -0800 |
commit | d9f57c099b5a5c7c63c527e1d93cc5f5c8e68d1e (patch) | |
tree | ae66fc543df2e8e55e5d4872f5d8162fac423179 /native-tools/CMakeLists.txt | |
parent | 32f72c7471daaea53c6f0c6a50a98f4a7fec3614 (diff) |
Use the correct functions set to the compiler switches
Diffstat (limited to 'native-tools/CMakeLists.txt')
-rw-r--r-- | native-tools/CMakeLists.txt | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/native-tools/CMakeLists.txt b/native-tools/CMakeLists.txt index c3055f8d..5e816bba 100644 --- a/native-tools/CMakeLists.txt +++ b/native-tools/CMakeLists.txt @@ -4,8 +4,9 @@ project(native-tools) include(CheckLibraryExists) +set(CPP_DEFS ) if(WIN32) - add_definitions("-D_WIN32") + set(CPP_DEFS ${CPP_DEFS} _WIN32) endif(WIN32) check_library_exists(m pow "" HAVE_LIBM) @@ -16,11 +17,13 @@ set_target_properties(bin2h PROPERTIES OUTPUT_NAME bin2h) # Avoid configuration-dependent subdirectories while building with Visual Studio set_target_properties(bin2h PROPERTIES RUNTIME_OUTPUT_DIRECTORY_DEBUG "${CMAKE_BINARY_DIR}") set_target_properties(bin2h PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELEASE "${CMAKE_BINARY_DIR}") +target_compile_definitions(bin2h PRIVATE ${CPP_DEFS}) add_executable(bsincgen bsincgen.c) set_target_properties(bsincgen PROPERTIES OUTPUT_NAME bsincgen) set_target_properties(bsincgen PROPERTIES RUNTIME_OUTPUT_DIRECTORY_DEBUG "${CMAKE_BINARY_DIR}") set_target_properties(bsincgen PROPERTIES RUNTIME_OUTPUT_DIRECTORY_RELEASE "${CMAKE_BINARY_DIR}") +target_compile_definitions(bsincgen PRIVATE ${CPP_DEFS}) if(HAVE_LIBM) target_link_libraries(bsincgen m) endif(HAVE_LIBM) |