Skip to content

Commit

Permalink
CMake: add CMAKE_BUILD_TYPE for properly linkage
Browse files Browse the repository at this point in the history
  • Loading branch information
eagleivg committed Aug 1, 2018
1 parent a3d92ea commit 3233456
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive --std=c++17")
#set(CMAKE_CXX_STANDARD_REQUIRED ON)
#set(CMAKE_CXX_EXTENSIONS OFF)

if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "" FORCE)
endif()

add_definitions(-D_MT -D_CPPUNWIND -DPURE_DYNAMIC_CAST -DDECLARE_SPECIALIZATION -DM_NOSTDCONTAINERS_EXT -DUSE_OGL)

set(LUA_INCLUDE_DIR Externals/LuaJIT/src)
Expand Down
2 changes: 1 addition & 1 deletion Externals/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
add_subdirectory(LuaJIT)
add_subdirectory(luabind)
#add_subdirectory(lzo)
add_subdirectory(cximage)
#add_subdirectory(lzo)
#add_subdirectory(NVTT)
add_subdirectory(OPCODE)
add_subdirectory(ode)
Expand Down
2 changes: 1 addition & 1 deletion src/xrCore/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@ set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "")
#this is a temporary solution until find_package will not be fixed
set(TBB_LIBRARIES tbb tbbmalloc_proxy tbbmalloc)

target_link_libraries(${PROJECT_NAME} xrMiscMath ${SDL_LIBRARIES} ${LZO_LIBRARY} ${CRYPTO++_LIBRARIES} ${PUGIXML_LIBRARY} ${TBB_LIBRARIES})
target_link_libraries(${PROJECT_NAME} xrMiscMath ${SDL_LIBRARIES} ${LZO_LIBRARIES} ${CRYPTO++_LIBRARIES} ${PUGIXML_LIBRARY} ${TBB_LIBRARIES})

0 comments on commit 3233456

Please sign in to comment.